Class: Nanoc::Int::RuleMemoryActions::Layout Private

Inherits:
Nanoc::Int::RuleMemoryAction show all
Defined in:
lib/nanoc/base/entities/rule_memory_actions/layout.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Nanoc::Int::RuleMemoryAction

#inspect

Constructor Details

#initialize(layout_identifier, params) ⇒ Layout

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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_identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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

#paramsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/nanoc/base/entities/rule_memory_actions/layout.rb', line 7

def params
  @params
end

Instance Method Details

#serializeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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