Class: EasyUpnp::OptionsBase
- Inherits:
-
Object
- Object
- EasyUpnp::OptionsBase
- Defined in:
- lib/easy_upnp/options_base.rb
Direct Known Subclasses
DeviceControlPoint::EventConfigOptions, DeviceControlPoint::Options, HttpListener::Options, Options
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options, defaults, &block) ⇒ OptionsBase
constructor
A new instance of OptionsBase.
Constructor Details
#initialize(options, defaults, &block) ⇒ OptionsBase
Returns a new instance of OptionsBase.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/easy_upnp/options_base.rb', line 21 def initialize(, defaults, &block) = defaults.merge() if block block_builder = Builder.new(defaults.keys) block.call(block_builder) = .merge(block_builder.) end defaults.map do |k, v| define_singleton_method(k) do [k] end end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
19 20 21 |
# File 'lib/easy_upnp/options_base.rb', line 19 def end |