Class: Nanoc::Int::RuleMemoryActions::Layout
- Inherits:
-
Nanoc::Int::RuleMemoryAction
- Object
- Nanoc::Int::RuleMemoryAction
- Nanoc::Int::RuleMemoryActions::Layout
- Defined in:
- lib/nanoc/base/entities/rule_memory_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
-
#initialize(layout_identifier, params) ⇒ Layout
constructor
A new instance of Layout.
-
#serialize ⇒ Object
-
#to_s ⇒ Object
Methods inherited from Nanoc::Int::RuleMemoryAction
Constructor Details
#initialize(layout_identifier, params) ⇒ Layout
Returns a new instance of Layout
9 10 11 12 |
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 9 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
6 7 8 |
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 6 def layout_identifier @layout_identifier end |
#params ⇒ Object (readonly)
Returns the value of attribute params
7 8 9 |
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 7 def params @params end |
Instance Method Details
#serialize ⇒ Object
14 15 16 |
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 14 def serialize [:layout, @layout_identifier, Nanoc::Int::Checksummer.calc(@params)] end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 18 def to_s "layout #{@layout_identifier.inspect}, #{@params.inspect}" end |