Class: Rory::Initializers::Initializer
- Inherits:
-
Object
- Object
- Rory::Initializers::Initializer
- Defined in:
- lib/rory/initializers.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(initializer) ⇒ Object
- #call(app) ⇒ Object
-
#initialize(name, block) ⇒ Initializer
constructor
A new instance of Initializer.
- #inspect ⇒ Object
Constructor Details
#initialize(name, block) ⇒ Initializer
Returns a new instance of Initializer.
8 9 10 11 |
# File 'lib/rory/initializers.rb', line 8 def initialize(name, block) @name = name @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
6 7 8 |
# File 'lib/rory/initializers.rb', line 6 def block @block end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rory/initializers.rb', line 6 def name @name end |
Instance Method Details
#==(initializer) ⇒ Object
13 14 15 |
# File 'lib/rory/initializers.rb', line 13 def ==(initializer) name == initializer.name end |
#call(app) ⇒ Object
21 22 23 |
# File 'lib/rory/initializers.rb', line 21 def call(app) block.call(app) end |
#inspect ⇒ Object
17 18 19 |
# File 'lib/rory/initializers.rb', line 17 def inspect "<Initializer '#{name}'>" end |