Class: Dreader::Options
- Inherits:
-
Object
- Object
- Dreader::Options
- Defined in:
- lib/dreader.rb
Overview
service class to implement the options DSL language
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #method_missing(name, *args, &block) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
21 22 23 |
# File 'lib/dreader.rb', line 21 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
25 26 27 |
# File 'lib/dreader.rb', line 25 def method_missing(name, *args, &block) @attributes[name] = args[0] end |
Instance Method Details
#to_hash ⇒ Object
29 30 31 |
# File 'lib/dreader.rb', line 29 def to_hash @attributes end |