Class: Lazier::Configuration
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Lazier::Configuration
- Defined in:
- lib/lazier/configuration.rb
Overview
A configuration class to set properties.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}, &block) ⇒ Configuration
constructor
Initializes a new configuration object.
Constructor Details
#initialize(attributes = {}, &block) ⇒ Configuration
Initializes a new configuration object.
14 15 16 17 |
# File 'lib/lazier/configuration.rb', line 14 def initialize(attributes = {}, &block) @i18n = Lazier::I18n.instance super(attributes, &block) end |
Class Method Details
.property(name, options = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/lazier/configuration.rb', line 26 def self.property(name, = {}) super(name, ) if [:readonly] send(:define_method, "#{name}=") do |_| assert_readonly_property!(name) end end end |