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.
26 27 28 |
# File 'lib/dreader.rb', line 26 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
30 31 32 |
# File 'lib/dreader.rb', line 30 def method_missing(name, *args, &block) @attributes[name] = args[0] end |
Instance Method Details
#to_hash ⇒ Object
34 35 36 |
# File 'lib/dreader.rb', line 34 def to_hash @attributes end |