Class: Transpec::Syntax::Its::AttributeExpression
- Inherits:
-
Object
- Object
- Transpec::Syntax::Its::AttributeExpression
- Defined in:
- lib/transpec/syntax/its.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #brackets? ⇒ Boolean
-
#initialize(node) ⇒ AttributeExpression
constructor
A new instance of AttributeExpression.
- #literal? ⇒ Boolean
Constructor Details
#initialize(node) ⇒ AttributeExpression
Returns a new instance of AttributeExpression.
122 123 124 |
# File 'lib/transpec/syntax/its.rb', line 122 def initialize(node) @node = node end |
Instance Method Details
#attributes ⇒ Object
134 135 136 137 138 139 140 |
# File 'lib/transpec/syntax/its.rb', line 134 def attributes @attributes ||= if brackets? brackets_attributes else non_brackets_attributes end end |
#brackets? ⇒ Boolean
126 127 128 |
# File 'lib/transpec/syntax/its.rb', line 126 def brackets? @node.type == :array end |