Class: Pacer::Filter::WhereFilter::NodeVisitor::Value
- Inherits:
-
Object
- Object
- Pacer::Filter::WhereFilter::NodeVisitor::Value
- Defined in:
- lib/pacer/filter/where_filter/node_visitor.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(value) ⇒ Value
constructor
A new instance of Value.
- #inspect(depth = 0) ⇒ Object
- #pipe ⇒ Object
- #values! ⇒ Object
Constructor Details
#initialize(value) ⇒ Value
Returns a new instance of Value.
83 84 85 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 83 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
88 89 90 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 88 def value @value end |
Instance Method Details
#build ⇒ Object
94 95 96 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 94 def build value end |
#inspect(depth = 0) ⇒ Object
90 91 92 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 90 def inspect(depth = 0) " " * depth + "Value: #{ value.inspect }" end |
#pipe ⇒ Object
87 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 87 def pipe; end |
#values! ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/pacer/filter/where_filter/node_visitor.rb', line 98 def values! if value.is_a? Array value.map do |v| if v.is_a? Value v.values! else raise "Arrays may not contain other properties" end end else value end end |