Class: Ecogem::Util::Config::Entry
- Inherits:
-
Object
- Object
- Ecogem::Util::Config::Entry
- Defined in:
- lib/ecogem/util/config/entry.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config, key) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(config, key) ⇒ Entry
Returns a new instance of Entry.
7 8 9 10 |
# File 'lib/ecogem/util/config/entry.rb', line 7 def initialize(config, key) @config = config @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/ecogem/util/config/entry.rb', line 5 def key @key end |
Class Method Details
.create(config, key, options = {}) ⇒ Object
12 13 14 15 |
# File 'lib/ecogem/util/config/entry.rb', line 12 def self.create(config, key, = {}) klass = [:class] || config.find_entry_class(key) klass.new(config, key) end |