Class: Modern::Capsule

Inherits:
Object
  • Object
show all
Defined in:
lib/modern/capsule.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Capsule

Returns a new instance of Capsule.



9
10
11
# File 'lib/modern/capsule.rb', line 9

def initialize(&block)
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



7
8
9
# File 'lib/modern/capsule.rb', line 7

def block
  @block
end

Class Method Details

.define(&block) ⇒ Object



13
14
15
# File 'lib/modern/capsule.rb', line 13

def self.define(&block)
  Capsule.new(&block)
end