Class: Herdsman::HerdMemberConfig
- Inherits:
-
Object
- Object
- Herdsman::HerdMemberConfig
- Defined in:
- lib/herdsman/herd_member_config.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #fetch_cache ⇒ Object
-
#initialize(path, args = {}, overrides = {}, defaults = {}) ⇒ HerdMemberConfig
constructor
A new instance of HerdMemberConfig.
- #name ⇒ Object
- #revision ⇒ Object
Constructor Details
#initialize(path, args = {}, overrides = {}, defaults = {}) ⇒ HerdMemberConfig
Returns a new instance of HerdMemberConfig.
4 5 6 7 8 9 10 |
# File 'lib/herdsman/herd_member_config.rb', line 4 def initialize(path, args = {}, overrides = {}, defaults = {}) @path = path @args = args @overrides = overrides @defaults = defaults validate! end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/herdsman/herd_member_config.rb', line 3 def path @path end |
Instance Method Details
#fetch_cache ⇒ Object
24 25 26 27 28 |
# File 'lib/herdsman/herd_member_config.rb', line 24 def fetch_cache overridable_arg('fetch_cache').to_i rescue default_fetch_cache end |
#name ⇒ Object
12 13 14 15 16 |
# File 'lib/herdsman/herd_member_config.rb', line 12 def name args.fetch('name') rescue default_name end |
#revision ⇒ Object
18 19 20 21 22 |
# File 'lib/herdsman/herd_member_config.rb', line 18 def revision overridable_arg('revision') rescue default_revision end |