Class: Ansr::Arel::Nodes::ConfiguredUnary
- Inherits:
-
Arel::Nodes::Node
- Object
- Arel::Nodes::Node
- Ansr::Arel::Nodes::ConfiguredUnary
- Defined in:
- lib/ansr/arel/nodes.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(expr, opts = {}) ⇒ ConfiguredUnary
constructor
A new instance of ConfiguredUnary.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(expr, opts = {}) ⇒ ConfiguredUnary
Returns a new instance of ConfiguredUnary.
5 6 7 8 |
# File 'lib/ansr/arel/nodes.rb', line 5 def initialize(expr, opts={}) @expr = expr @opts = opts end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
10 11 12 13 |
# File 'lib/ansr/arel/nodes.rb', line 10 def method_missing(method, *args) @opts[method] = args if args.first @opts[method] end |
Instance Attribute Details
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
3 4 5 |
# File 'lib/ansr/arel/nodes.rb', line 3 def expr @expr end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
3 4 5 |
# File 'lib/ansr/arel/nodes.rb', line 3 def opts @opts end |