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.
7 8 9 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 7 def symbol @symbol end |
Instance Method Details
#==(other) ⇒ Object
13 14 15 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 13 def ==(other) super && @symbol == other.symbol end |
#if_value(_entity, options) ⇒ Object
17 18 19 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 17 def if_value(_entity, ) [symbol] end |
#setup(symbol) ⇒ Object
9 10 11 |
# File 'lib/grape_entity/condition/symbol_condition.rb', line 9 def setup(symbol) @symbol = symbol end |