Class: HaproxyParser::Builders::Base
- Inherits:
-
Object
- Object
- HaproxyParser::Builders::Base
- Defined in:
- lib/haproxy_parser/builders/base.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#section ⇒ Object
readonly
Returns the value of attribute section.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(section:, default: {}) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
Constructor Details
#initialize(section:, default: {}) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/haproxy_parser/builders/base.rb', line 6 def initialize(section:, default: {}) @section = section @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
5 6 7 |
# File 'lib/haproxy_parser/builders/base.rb', line 5 def default @default end |
#section ⇒ Object (readonly)
Returns the value of attribute section.
5 6 7 |
# File 'lib/haproxy_parser/builders/base.rb', line 5 def section @section end |
Instance Method Details
#attributes ⇒ Object
11 12 13 |
# File 'lib/haproxy_parser/builders/base.rb', line 11 def attributes raise(NotImplementedError) end |
#name ⇒ Object
15 16 17 |
# File 'lib/haproxy_parser/builders/base.rb', line 15 def name @name ||= dig_data("name") end |