Class: ConvenientService::Feature::Plugins::CanHaveEntries::Commands::DefineEntries
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Feature::Plugins::CanHaveEntries::Commands::DefineEntries
- Defined in:
- lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#feature_class ⇒ Object
readonly
Returns the value of attribute feature_class.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Instance Method Summary collapse
- #call ⇒ Array<String, Symbol>
-
#initialize(feature_class:, names:, body:) ⇒ DefineEntries
constructor
A new instance of DefineEntries.
Methods inherited from Support::Command
Constructor Details
#initialize(feature_class:, names:, body:) ⇒ DefineEntries
Returns a new instance of DefineEntries.
32 33 34 35 36 |
# File 'lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb', line 32 def initialize(feature_class:, names:, body:) @feature_class = feature_class @names = names @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
25 26 27 |
# File 'lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb', line 25 def body @body end |
#feature_class ⇒ Object (readonly)
Returns the value of attribute feature_class.
13 14 15 |
# File 'lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb', line 13 def feature_class @feature_class end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
19 20 21 |
# File 'lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb', line 19 def names @names end |
Instance Method Details
#call ⇒ Array<String, Symbol>
41 42 43 |
# File 'lib/convenient_service/feature/plugins/can_have_entries/commands/define_entries.rb', line 41 def call names.map { |name| Commands::DefineEntry.call(feature_class: feature_class, name: name, body: body) } end |