Module: SnowyOwl::Plots

Defined in:
lib/snowy_owl/plots.rb,
lib/snowy_owl/rspec.rb

Class Method Summary collapse

Class Method Details

.old_writeObject



15
16
17
18
19
20
21
22
23
# File 'lib/snowy_owl/rspec.rb', line 15

def write(plot_name, &block)
  proc = proc do |*args|
    extend SnowyOwl::Props
    extend SnowyOwl::Determinations
    instance_exec(*args, &block)
  end
  @__plots__ ||= {}
  @__plots__[plot_name] = proc
end

.plot(plot_name) ⇒ Object



14
15
16
# File 'lib/snowy_owl/plots.rb', line 14

def plot(plot_name)
  @__plots__[plot_name]
end

.write(plot_name, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/snowy_owl/plots.rb', line 4

def write(plot_name, &block)
  proc = proc do |*args|
    extend SnowyOwl::Props
    extend SnowyOwl::Determinations
    instance_exec(*args, &block)
  end
  @__plots__ ||= {}
  @__plots__[plot_name] = proc
end