Class: JSONFactory::Configuration
- Inherits:
-
Object
- Object
- JSONFactory::Configuration
- Includes:
- Singleton
- Defined in:
- lib/json_factory/configuration.rb
Instance Attribute Summary collapse
-
#helpers ⇒ Object
readonly
Returns the value of attribute helpers.
Instance Method Summary collapse
- #extend_dsl(mod) ⇒ Object
- #include_helper(mod) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 |
# File 'lib/json_factory/configuration.rb', line 11 def initialize @helpers = [] end |
Instance Attribute Details
#helpers ⇒ Object (readonly)
Returns the value of attribute helpers.
9 10 11 |
# File 'lib/json_factory/configuration.rb', line 9 def helpers @helpers end |
Instance Method Details
#extend_dsl(mod) ⇒ Object
19 20 21 |
# File 'lib/json_factory/configuration.rb', line 19 def extend_dsl(mod) JSONFactory::DSL.include(mod) end |
#include_helper(mod) ⇒ Object
15 16 17 |
# File 'lib/json_factory/configuration.rb', line 15 def include_helper(mod) @helpers.push(mod) end |