Class: Nanoc::Int::InMemDataSource
- Inherits:
-
DataSource
- Object
- DataSource
- Nanoc::Int::InMemDataSource
- Defined in:
- lib/nanoc/base/repos/in_mem_data_source.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#layouts ⇒ Object
readonly
Returns the value of attribute layouts.
Attributes inherited from DataSource
#config, #items_root, #layouts_root
Instance Method Summary collapse
-
#initialize(items, layouts) ⇒ InMemDataSource
constructor
A new instance of InMemDataSource.
Methods inherited from DataSource
#down, #loading, #new_item, #new_layout, #unuse, #up, #use
Constructor Details
#initialize(items, layouts) ⇒ InMemDataSource
Returns a new instance of InMemDataSource
8 9 10 11 12 13 |
# File 'lib/nanoc/base/repos/in_mem_data_source.rb', line 8 def initialize(items, layouts) super({}, '/', '/', {}) @items = items @layouts = layouts end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items
5 6 7 |
# File 'lib/nanoc/base/repos/in_mem_data_source.rb', line 5 def items @items end |
#layouts ⇒ Object (readonly)
Returns the value of attribute layouts
6 7 8 |
# File 'lib/nanoc/base/repos/in_mem_data_source.rb', line 6 def layouts @layouts end |