Class: Yes::Core::Aggregate::Dsl::CommandGroupData
- Inherits:
-
Object
- Object
- Yes::Core::Aggregate::Dsl::CommandGroupData
- Defined in:
- lib/yes/core/aggregate/dsl/command_group_data.rb
Overview
Data object that holds information about a command_group definition in an aggregate.
Instance Attribute Summary collapse
- #aggregate_class ⇒ Object readonly
- #aggregate_name ⇒ Object readonly
- #context_name ⇒ Object readonly
- #guard_names ⇒ Object
- #name ⇒ Object readonly
- #sub_command_names ⇒ Object
Instance Method Summary collapse
- #add_guard(name) ⇒ void
- #add_sub_command(name) ⇒ void
-
#initialize(name, aggregate_class, options = {}) ⇒ CommandGroupData
constructor
A new instance of CommandGroupData.
Constructor Details
#initialize(name, aggregate_class, options = {}) ⇒ CommandGroupData
Returns a new instance of CommandGroupData.
21 22 23 24 25 26 27 28 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 21 def initialize(name, aggregate_class, = {}) @name = name @aggregate_class = aggregate_class @context_name = [:context] @aggregate_name = [:aggregate] @sub_command_names = [] @guard_names = [] end |
Instance Attribute Details
#aggregate_class ⇒ Object (readonly)
13 14 15 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 13 def aggregate_class @aggregate_class end |
#aggregate_name ⇒ Object (readonly)
13 14 15 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 13 def aggregate_name @aggregate_name end |
#context_name ⇒ Object (readonly)
13 14 15 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 13 def context_name @context_name end |
#guard_names ⇒ Object
14 15 16 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 14 def guard_names @guard_names end |
#name ⇒ Object (readonly)
13 14 15 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 13 def name @name end |
#sub_command_names ⇒ Object
14 15 16 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 14 def sub_command_names @sub_command_names end |
Instance Method Details
#add_guard(name) ⇒ void
This method returns an undefined value.
38 39 40 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 38 def add_guard(name) @guard_names << name end |
#add_sub_command(name) ⇒ void
This method returns an undefined value.
32 33 34 |
# File 'lib/yes/core/aggregate/dsl/command_group_data.rb', line 32 def add_sub_command(name) @sub_command_names << name end |