Class: CallSheet::DSL

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, &block) ⇒ DSL

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DSL.



22
23
24
25
26
27
28
# File 'lib/call_sheet/dsl.rb', line 22

def initialize(options, &block)
  @options = options
  @container = options.fetch(:container)
  @steps = []

  instance_exec(&block)
end

Instance Attribute Details

#containerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/call_sheet/dsl.rb', line 16

def container
  @container
end

#optionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/call_sheet/dsl.rb', line 13

def options
  @options
end

#stepsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/call_sheet/dsl.rb', line 19

def steps
  @steps
end

Instance Method Details

#callObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



38
39
40
# File 'lib/call_sheet/dsl.rb', line 38

def call
  Transaction.new(steps)
end