Module: BluelineServices::DSL

Included in:
Request
Defined in:
lib/blueline_services/dsl.rb

Instance Method Summary collapse

Instance Method Details

#alias(h = {}, &block) ⇒ Object



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

def alias(h={}, &block)
  @aliases << person_name(h, &block)
end

#person_name(h = {}) {|p| ... } ⇒ Object

Yields:

  • (p)


23
24
25
26
27
# File 'lib/blueline_services/dsl.rb', line 23

def person_name(h={}, &block)
  p = PersonName.new(h)
  yield p if block_given?
  p
end

#screen(klass, h = {}) {|s| ... } ⇒ Object

Yields:

  • (s)


4
5
6
7
8
# File 'lib/blueline_services/dsl.rb', line 4

def screen(klass, h={}, &block)
  s = klass.new(h)
  yield s if block_given?
  @screenings << s
end