Class: RablRails::Nodes::Code
- Inherits:
-
Object
- Object
- RablRails::Nodes::Code
- Includes:
- Node
- Defined in:
- lib/rabl-rails/nodes/code.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, block, condition = nil) ⇒ Code
constructor
A new instance of Code.
- #merge? ⇒ Boolean
Methods included from Node
Constructor Details
#initialize(name, block, condition = nil) ⇒ Code
Returns a new instance of Code.
8 9 10 11 12 |
# File 'lib/rabl-rails/nodes/code.rb', line 8 def initialize(name, block, condition = nil) @name = name @block = block @condition = condition end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
6 7 8 |
# File 'lib/rabl-rails/nodes/code.rb', line 6 def block @block end |
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
6 7 8 |
# File 'lib/rabl-rails/nodes/code.rb', line 6 def condition @condition end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rabl-rails/nodes/code.rb', line 6 def name @name end |
Instance Method Details
#merge? ⇒ Boolean
14 15 16 |
# File 'lib/rabl-rails/nodes/code.rb', line 14 def merge? !name end |