Package org.jruby.util

Examples of org.jruby.util.RubyDateFormat$Token


    public RubyThread getThread() {
        return thread;
    }
   
    public RubyDateFormat getRubyDateFormat() {
        if (dateFormat == null) dateFormat = new RubyDateFormat("-", Locale.US, runtime.is1_9());
       
        return dateFormat;
    }
View Full Code Here


        return newTime(getRuntime(), dt.withZone(getLocalTimeZone(getRuntime())), nsec);
    }

    @JRubyMethod(name = "strftime", required = 1)
    public RubyString strftime(IRubyObject format) {
        final RubyDateFormat rubyDateFormat = getRuntime().getCurrentContext().getRubyDateFormat();
        rubyDateFormat.applyPattern(format.convertToString().getUnicodeValue());
        rubyDateFormat.setDateTime(dt);
        rubyDateFormat.setNSec(nsec);
        String result = rubyDateFormat.format(null);
        return getRuntime().newString(result);
    }
View Full Code Here

        client.listTenants(fakeToken);
    }

    private KeystoneAuthenticationToken buildFakeToken(String tokenCode) {
        Access auth = new Access();
        Token tokenObject = new Token();
        tokenObject.setId(tokenCode);
        auth.setToken(tokenObject);
        return new KeystoneAuthenticationToken(auth);
    }
View Full Code Here

TOP

Related Classes of org.jruby.util.RubyDateFormat$Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.