Module: SsciInc::DSL

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

Instance Method Summary collapse

Instance Method Details

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



18
19
20
# File 'lib/ssci_inc/dsl.rb', line 18

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

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

Yields:

  • (p)


22
23
24
25
26
# File 'lib/ssci_inc/dsl.rb', line 22

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/ssci_inc/dsl.rb', line 4

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