Class: MODL::Model::ModlString
- Inherits:
-
Object
- Object
- MODL::Model::ModlString
- Defined in:
- lib/modl/model/model.rb
Overview
A MODL String
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ ModlString
constructor
A new instance of ModlString.
- #to_j ⇒ Object
- #to_m ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ ModlString
Returns a new instance of ModlString.
174 175 176 |
# File 'lib/modl/model/model.rb', line 174 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
172 173 174 |
# File 'lib/modl/model/model.rb', line 172 def value @value end |
Instance Method Details
#to_j ⇒ Object
182 183 184 |
# File 'lib/modl/model/model.rb', line 182 def to_j @value end |
#to_m ⇒ Object
186 187 188 |
# File 'lib/modl/model/model.rb', line 186 def to_m UTIL.escape_and_quote @value end |
#to_s ⇒ Object
178 179 180 |
# File 'lib/modl/model/model.rb', line 178 def to_s "ModlString: #{@value}" end |