Class: Grape::Entity::Condition::SymbolCondition
- Defined in:
- lib/grape_entity/condition/symbol_condition.rb
Instance Attribute Summary collapse
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
Methods inherited from Base
#initialize, #inversed?, #met?, new, #unless_value
Constructor Details
This class inherits a constructor from Grape::Entity::Condition::Base
Instance Attribute Details
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
5 6 7 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 5 def symbol @symbol end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 11 def ==(other) super && @symbol == other.symbol end |
#if_value(_entity, options) ⇒ Object
15 16 17 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 15 def if_value(_entity, ) [symbol] end |
#setup(symbol) ⇒ Object
7 8 9 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 7 def setup(symbol) @symbol = symbol end |