Class: Freeb::DSL
- Inherits:
-
Object
- Object
- Freeb::DSL
- Defined in:
- lib/freeb/dsl.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #has_many(*args) ⇒ Object
-
#initialize ⇒ DSL
constructor
A new instance of DSL.
- #properties(*args) ⇒ Object
- #topics(*args) ⇒ Object
- #type(value) ⇒ Object
Constructor Details
#initialize ⇒ DSL
Returns a new instance of DSL.
5 6 7 |
# File 'lib/freeb/dsl.rb', line 5 def initialize @config = {} end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/freeb/dsl.rb', line 3 def config @config end |
Instance Method Details
#has_many(*args) ⇒ Object
21 22 23 |
# File 'lib/freeb/dsl.rb', line 21 def has_many(*args) @config[:has_many] = args end |
#properties(*args) ⇒ Object
13 14 15 |
# File 'lib/freeb/dsl.rb', line 13 def properties(*args) @config[:properties] = args end |
#topics(*args) ⇒ Object
17 18 19 |
# File 'lib/freeb/dsl.rb', line 17 def topics(*args) @config[:topics] = args end |
#type(value) ⇒ Object
9 10 11 |
# File 'lib/freeb/dsl.rb', line 9 def type(value) @config[:type] = value end |