Class: Glaemscribe::API::Eval::Token
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #clone(value = nil) ⇒ Object
-
#initialize(name, expression) ⇒ Token
constructor
A new instance of Token.
- #regexp? ⇒ Boolean
Constructor Details
#initialize(name, expression) ⇒ Token
Returns a new instance of Token.
39 40 41 42 43 |
# File 'lib/api/eval.rb', line 39 def initialize(name, expression) @name = name @expression = expression @value = nil end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
37 38 39 |
# File 'lib/api/eval.rb', line 37 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
37 38 39 |
# File 'lib/api/eval.rb', line 37 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
38 39 40 |
# File 'lib/api/eval.rb', line 38 def value @value end |
Instance Method Details
#clone(value = nil) ⇒ Object
47 48 49 50 51 |
# File 'lib/api/eval.rb', line 47 def clone(value=nil) t = super() t.value = value t end |
#regexp? ⇒ Boolean
44 45 46 |
# File 'lib/api/eval.rb', line 44 def regexp? @expression.is_a? Regexp end |