Class: Jsapi::JSON::Integer
Overview
Represents a JSON integer.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize(value, schema) ⇒ Integer
constructor
A new instance of Integer.
Methods inherited from Value
#empty?, #inspect, #null?, #validate
Constructor Details
#initialize(value, schema) ⇒ Integer
Returns a new instance of Integer.
9 10 11 12 |
# File 'lib/jsapi/json/integer.rb', line 9 def initialize(value, schema) super(schema) @value = schema.convert(value.to_i) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/jsapi/json/integer.rb', line 7 def value @value end |