Class: CompactData::Model::CompactDataInteger
- Inherits:
-
Object
- Object
- CompactData::Model::CompactDataInteger
- Defined in:
- lib/compactdata/model/model.rb
Overview
A CompactData Integer
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ CompactDataInteger
constructor
A new instance of CompactDataInteger.
- #to_j ⇒ Object
- #to_m ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ CompactDataInteger
Returns a new instance of CompactDataInteger.
153 154 155 |
# File 'lib/compactdata/model/model.rb', line 153 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
151 152 153 |
# File 'lib/compactdata/model/model.rb', line 151 def value @value end |
Instance Method Details
#to_j ⇒ Object
161 162 163 |
# File 'lib/compactdata/model/model.rb', line 161 def to_j @value end |
#to_m ⇒ Object
165 166 167 |
# File 'lib/compactdata/model/model.rb', line 165 def to_m @value.to_s end |
#to_s ⇒ Object
157 158 159 |
# File 'lib/compactdata/model/model.rb', line 157 def to_s "CompactDataInteger: #{@value}" end |