Sha256: 5586b87330e8ae6d41952b3153a8a0e4b3fb8cc92ec714fde268f73556809697

Contents?: true

Size: 818 Bytes

Versions: 19

Compression:

Stored size: 818 Bytes

Contents

class RestModel
  module Configuration
    extend self

    attr_accessor :host

    DefaultHandler = proc {|keys| keys}

    def convert_input_keys
      @convert_input_keys || DefaultHandler
    end

    def convert_input_keys=(converter)
      @convert_input_keys = converter
    end

    def true_value
      @true || true
    end

    def true_value=(value)
      @true = value
    end

    def false_value
      @false || false
    end

    def false_value=(value)
      @false = value
    end

    def date_format
      @date_format
    end

    def date_format=(format)
      @date_format = format
    end

    def date_time_format
      @date_time_format
    end

    def date_time_format=(format)
      @date_time_format = format
    end

    def configure
      yield self if block_given?
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rest_model-0.2.1 lib/rest_model/configuration.rb
rest_model-0.2.0 lib/rest_model/configuration.rb
rest_model-0.1.24 lib/rest_model/configuration.rb
rest_model-0.1.23 lib/rest_model/configuration.rb
rest_model-0.1.22 lib/rest_model/configuration.rb
rest_model-0.1.21 lib/rest_model/configuration.rb
rest_model-0.1.20 lib/rest_model/configuration.rb
rest_model-0.1.19 lib/rest_model/configuration.rb
rest_model-0.1.18 lib/rest_model/configuration.rb
rest_model-0.1.17 lib/rest_model/configuration.rb
rest_model-0.1.16 lib/rest_model/configuration.rb
rest_model-0.1.15 lib/rest_model/configuration.rb
rest_model-0.1.14 lib/rest_model/configuration.rb
rest_model-0.1.13 lib/rest_model/configuration.rb
rest_model-0.1.12 lib/rest_model/configuration.rb
rest_model-0.1.11 lib/rest_model/configuration.rb
rest_model-0.1.10 lib/rest_model/configuration.rb
rest_model-0.1.9 lib/rest_model/configuration.rb
rest_model-0.1.8 lib/rest_model/configuration.rb