Class: Micro::Cases::Map
- Inherits:
-
Object
- Object
- Micro::Cases::Map
- Defined in:
- lib/micro/cases/map.rb
Instance Attribute Summary collapse
-
#use_cases ⇒ Object
readonly
Returns the value of attribute use_cases.
Class Method Summary collapse
Instance Method Summary collapse
- #call(arg = {}) ⇒ Object
-
#initialize(use_cases) ⇒ Map
constructor
A new instance of Map.
Constructor Details
#initialize(use_cases) ⇒ Map
Returns a new instance of Map.
18 19 20 |
# File 'lib/micro/cases/map.rb', line 18 def initialize(use_cases) @use_cases = use_cases end |
Instance Attribute Details
#use_cases ⇒ Object (readonly)
Returns the value of attribute use_cases.
10 11 12 |
# File 'lib/micro/cases/map.rb', line 10 def use_cases @use_cases end |
Class Method Details
.build(args) ⇒ Object
12 13 14 15 16 |
# File 'lib/micro/cases/map.rb', line 12 def self.build(args) raise Error::InvalidUseCases unless HasValidArgs[args] new(args) end |
Instance Method Details
#call(arg = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/micro/cases/map.rb', line 32 def call(arg = {}) hash = Kind::Hash[arg] use_cases.map(&GetUseCaseResult[hash]) end |