Class: ArelExtensions::Nodes::Case
- Inherits:
-
Arel::Nodes::Case
- Object
- Arel::Nodes::Case
- ArelExtensions::Nodes::Case
- Defined in:
- lib/arel_extensions/nodes/case.rb,
lib/arel_extensions/nodes/case.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#case ⇒ Object
Returns the value of attribute case.
-
#conditions ⇒ Object
Returns the value of attribute conditions.
-
#default ⇒ Object
Returns the value of attribute default.
Instance Method Summary collapse
-
#initialize(expression = nil, default = nil) ⇒ Case
constructor
A new instance of Case.
Constructor Details
#initialize(expression = nil, default = nil) ⇒ Case
Returns a new instance of Case.
7 8 9 10 11 |
# File 'lib/arel_extensions/nodes/case.rb', line 7 def initialize expression = nil, default = nil @case = expression @conditions = [] @default = default end |
Instance Attribute Details
#case ⇒ Object
Returns the value of attribute case.
5 6 7 |
# File 'lib/arel_extensions/nodes/case.rb', line 5 def case @case end |
#conditions ⇒ Object
Returns the value of attribute conditions.
5 6 7 |
# File 'lib/arel_extensions/nodes/case.rb', line 5 def conditions @conditions end |
#default ⇒ Object
Returns the value of attribute default.
5 6 7 |
# File 'lib/arel_extensions/nodes/case.rb', line 5 def default @default end |