Class: Freeb::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/freeb/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDSL

Returns a new instance of DSL.



5
6
7
# File 'lib/freeb/dsl.rb', line 5

def initialize
  @config = {}
end

Instance Attribute Details

#configObject (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