Class: Arel::Enhance::PathNode
- Inherits:
-
Object
- Object
- Arel::Enhance::PathNode
- Defined in:
- lib/arel/enhance/path_node.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #arguments? ⇒ Boolean
-
#initialize(method, value) ⇒ PathNode
constructor
A new instance of PathNode.
- #inspect ⇒ Object
Constructor Details
#initialize(method, value) ⇒ PathNode
Returns a new instance of PathNode.
7 8 9 10 |
# File 'lib/arel/enhance/path_node.rb', line 7 def initialize(method, value) @method = method @value = value end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'lib/arel/enhance/path_node.rb', line 4 def method @method end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/arel/enhance/path_node.rb', line 5 def value @value end |
Instance Method Details
#arguments? ⇒ Boolean
12 13 14 |
# File 'lib/arel/enhance/path_node.rb', line 12 def arguments? method.is_a?(Array) end |
#inspect ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/arel/enhance/path_node.rb', line 16 def inspect case value when String "'#{value}'" else value.inspect end end |