Class: Profligacy::Swing::RunnableProc

Inherits:
Object
  • Object
show all
Includes:
Runnable
Defined in:
lib/profligacy/swing.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ RunnableProc

Returns a new instance of RunnableProc.



15
16
17
# File 'lib/profligacy/swing.rb', line 15

def initialize(&block)
  @block = block
end

Instance Method Details

#runObject



19
20
21
# File 'lib/profligacy/swing.rb', line 19

def run
  @block.call
end