Module: DevSuite::Utils::Construct::Config::Attribute::AttrDefinition
- Defined in:
- lib/dev_suite/utils/construct/config/attribute/attr_definition.rb
Instance Method Summary collapse
- #config_attr(attr, default_value: nil, type: nil, resolver: nil) ⇒ Object
- #config_attr_present?(attr) ⇒ Boolean
- #config_attrs ⇒ Object
Instance Method Details
#config_attr(attr, default_value: nil, type: nil, resolver: nil) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/dev_suite/utils/construct/config/attribute/attr_definition.rb', line 9 def config_attr(attr, default_value: nil, type: nil, resolver: nil) config_attrs[attr] = build_attr_details( default_value: default_value, type: type, resolver: resolver, ) define_config_attr_methods(attr) end |
#config_attr_present?(attr) ⇒ Boolean
22 23 24 |
# File 'lib/dev_suite/utils/construct/config/attribute/attr_definition.rb', line 22 def config_attr_present?(attr) config_attrs.key?(attr) end |
#config_attrs ⇒ Object
18 19 20 |
# File 'lib/dev_suite/utils/construct/config/attribute/attr_definition.rb', line 18 def config_attrs @config_attrs ||= {} end |