Class: Rips::Variables::Variable
- Inherits:
-
Object
- Object
- Rips::Variables::Variable
- Defined in:
- lib/rips/variables/variable.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
-
#error(value) ⇒ Object
Return error message about incorrent syntax.
-
#initialize(length) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(length) ⇒ Variable
Returns a new instance of Variable.
11 12 13 |
# File 'lib/rips/variables/variable.rb', line 11 def initialize (length) @length = length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
8 9 10 |
# File 'lib/rips/variables/variable.rb', line 8 def length @length end |
Instance Method Details
#error(value) ⇒ Object
Return error message about incorrent syntax
16 17 18 |
# File 'lib/rips/variables/variable.rb', line 16 def error (value) "unexpected `#{value}` (expected a `#{self.class.to_s.split(':').last}` argument like `#{@syntax}`)" end |