Class: RablRails::Nodes::Lookup
- Inherits:
-
Object
- Object
- RablRails::Nodes::Lookup
- Defined in:
- lib/rabl-rails/nodes/lookup.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #cast_to_boolean? ⇒ Boolean
-
#initialize(name, data, field, cast = false) ⇒ Lookup
constructor
A new instance of Lookup.
- #instance_variable_data? ⇒ Boolean
Constructor Details
#initialize(name, data, field, cast = false) ⇒ Lookup
Returns a new instance of Lookup.
6 7 8 9 10 11 12 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 6 def initialize(name, data, field, cast = false) @name = name @data = data @field = field @cast = cast @is_var = @data.to_s.start_with?('@') end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 4 def data @data end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
4 5 6 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 4 def field @field end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 4 def name @name end |
Instance Method Details
#cast_to_boolean? ⇒ Boolean
18 19 20 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 18 def cast_to_boolean? @cast end |
#instance_variable_data? ⇒ Boolean
14 15 16 |
# File 'lib/rabl-rails/nodes/lookup.rb', line 14 def instance_variable_data? @is_var end |