Module: Deck::Submodule
- Included in:
- Container::Add, Container::Archive, Container::Cmd, Container::Env, Container::Expose, Container::From, Container::Name, Container::Publish, Container::Repository, Container::Start, Container::Tag, Container::Variable, Container::WorkDir
- Defined in:
- lib/deck/submodule.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #attributes ⇒ Object
- #build_command(deps) ⇒ Object
- #get ⇒ Object
- #map ⇒ Object
- #set(*args) ⇒ Object
- #value ⇒ Object
Class Method Details
.included(target) ⇒ Object
72 73 74 |
# File 'lib/deck/submodule.rb', line 72 def self.included(target) target.extend ClassMethods end |
Instance Method Details
#attributes ⇒ Object
15 16 17 18 |
# File 'lib/deck/submodule.rb', line 15 def attributes @attributes ||= {} @attributes end |
#build_command(deps) ⇒ Object
34 35 |
# File 'lib/deck/submodule.rb', line 34 def build_command(deps) end |
#get ⇒ Object
29 30 31 32 |
# File 'lib/deck/submodule.rb', line 29 def get method = map[self.class.type][:get] public_send method if respond_to? method end |
#map ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/deck/submodule.rb', line 2 def map { build: { set: :define, get: :export }, meta: { set: :define, get: :prepare } } end |
#set(*args) ⇒ Object
24 25 26 27 |
# File 'lib/deck/submodule.rb', line 24 def set(*args) method = map[self.class.type][:set] public_send method, *args if respond_to? method end |
#value ⇒ Object
20 21 22 |
# File 'lib/deck/submodule.rb', line 20 def value attributes end |