Class: Nanoc::Core::ProcessingActions::Layout
- Inherits:
-
Nanoc::Core::ProcessingAction
- Object
- Nanoc::Core::ProcessingAction
- Nanoc::Core::ProcessingActions::Layout
- Defined in:
- lib/nanoc/core/processing_actions/layout.rb
Instance Attribute Summary collapse
-
#layout_identifier ⇒ Object
readonly
layout ‘/foo.erb’ layout ‘/foo.erb’, params.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(layout_identifier, params) ⇒ Layout
constructor
A new instance of Layout.
- #serialize ⇒ Object
- #to_s ⇒ Object
Methods inherited from Nanoc::Core::ProcessingAction
Constructor Details
#initialize(layout_identifier, params) ⇒ Layout
Returns a new instance of Layout.
13 14 15 16 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 13 def initialize(layout_identifier, params) @layout_identifier = layout_identifier @params = params end |
Instance Attribute Details
#layout_identifier ⇒ Object (readonly)
layout ‘/foo.erb’ layout ‘/foo.erb’, params
10 11 12 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 10 def layout_identifier @layout_identifier end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
11 12 13 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 11 def params @params end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 30 def ==(other) self.class == other.class && layout_identifier == other.layout_identifier && params == other.params end |
#eql?(other) ⇒ Boolean
34 35 36 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 34 def eql?(other) self == other end |
#hash ⇒ Object
26 27 28 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 26 def hash [self.class, layout_identifier, params].hash end |
#serialize ⇒ Object
18 19 20 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 18 def serialize [:layout, @layout_identifier, Nanoc::Core::Checksummer.calc(@params)] end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/nanoc/core/processing_actions/layout.rb', line 22 def to_s "layout #{@layout_identifier.inspect}, #{@params.inspect}" end |