Class: Flounder::SymbolExtensions::Modifier
- Inherits:
-
Struct
- Object
- Struct
- Flounder::SymbolExtensions::Modifier
- Defined in:
- lib/flounder/symbol_extensions.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#sym ⇒ Object
Returns the value of attribute sym.
Instance Method Summary collapse
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind
3 4 5 |
# File 'lib/flounder/symbol_extensions.rb', line 3 def kind @kind end |
#sym ⇒ Object
Returns the value of attribute sym
3 4 5 |
# File 'lib/flounder/symbol_extensions.rb', line 3 def sym @sym end |
Instance Method Details
#to_arel_field(entity) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/flounder/symbol_extensions.rb', line 4 def to_arel_field entity af = case sym when Symbol entity[sym].arel_field when Flounder::Field sym.arel_field when Flounder::Expression::Expr sym.to_immediate.to_arel_field else fail "ASSERTION FAILURE: Unknown type in field.sym: #{field.sym.inspect}." end end |