Module: RestModel::Configuration

Extended by:
Configuration
Included in:
Configuration
Defined in:
lib/rest_model/configuration.rb

Constant Summary collapse

DefaultHandler =
proc {|keys| keys}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host.



5
6
7
# File 'lib/rest_model/configuration.rb', line 5

def host
  @host
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



9
10
11
# File 'lib/rest_model/configuration.rb', line 9

def configure
  yield self if block_given?
end

#convert_input_keysObject



13
14
15
# File 'lib/rest_model/configuration.rb', line 13

def convert_input_keys
  @convert_input_keys || DefaultHandler
end

#convert_input_keys=(converter) ⇒ Object



17
18
19
# File 'lib/rest_model/configuration.rb', line 17

def convert_input_keys=(converter)
  @convert_input_keys = converter
end

#date_formatObject



37
38
39
# File 'lib/rest_model/configuration.rb', line 37

def date_format
  @date_format
end

#date_format=(format) ⇒ Object



41
42
43
# File 'lib/rest_model/configuration.rb', line 41

def date_format=(format)
  @date_format = format
end

#date_time_formatObject



45
46
47
# File 'lib/rest_model/configuration.rb', line 45

def date_time_format
  @date_time_format
end

#date_time_format=(format) ⇒ Object



49
50
51
# File 'lib/rest_model/configuration.rb', line 49

def date_time_format=(format)
  @date_time_format = format
end

#false_valueObject



29
30
31
# File 'lib/rest_model/configuration.rb', line 29

def false_value
  @false || false
end

#false_value=(value) ⇒ Object



33
34
35
# File 'lib/rest_model/configuration.rb', line 33

def false_value=(value)
  @false = value
end

#true_valueObject



21
22
23
# File 'lib/rest_model/configuration.rb', line 21

def true_value
  @true || true
end

#true_value=(value) ⇒ Object



25
26
27
# File 'lib/rest_model/configuration.rb', line 25

def true_value=(value)
  @true = value
end