Class: Creepin::On

Inherits:
Object
  • Object
show all
Defined in:
lib/creepin/on.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ On

Returns a new instance of On.



5
6
7
8
9
# File 'lib/creepin/on.rb', line 5

def initialize(name, &block)
  @config = {}
  @name = name
  instance_eval(&block)
end

Instance Method Details

#collection(*options, &block) ⇒ Object



11
12
13
# File 'lib/creepin/on.rb', line 11

def collection(*options, &block)
  Creepin::Collection.new(@name, *options, &block)
end

#resource(*options, &block) ⇒ Object



15
16
17
# File 'lib/creepin/on.rb', line 15

def resource(*options, &block)
  Creepin::Resource.new(@name, *options, &block)
end