Class: Minato::Utils::BaseCommand::ShowBy
- Inherits:
-
Object
- Object
- Minato::Utils::BaseCommand::ShowBy
- Includes:
- SimpleCommand
- Defined in:
- lib/minato/utils/base_command/show_by.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model_class, attribute, value) ⇒ ShowBy
constructor
A new instance of ShowBy.
Constructor Details
#initialize(model_class, attribute, value) ⇒ ShowBy
Returns a new instance of ShowBy.
9 10 11 12 13 |
# File 'lib/minato/utils/base_command/show_by.rb', line 9 def initialize(model_class, attribute, value) @model_class = model_class @attribute = attribute @value = value end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/minato/utils/base_command/show_by.rb', line 15 def call @model_class.send :find_by!, @attribute => @value end |