Class: Dato::Local::Site
- Inherits:
-
Object
- Object
- Dato::Local::Site
- Defined in:
- lib/dato/local/site.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#entities_repo ⇒ Object
readonly
Returns the value of attribute entities_repo.
-
#items_repo ⇒ Object
readonly
Returns the value of attribute items_repo.
Instance Method Summary collapse
- #entity ⇒ Object
-
#initialize(client) ⇒ Site
constructor
A new instance of Site.
- #load ⇒ Object
Constructor Details
#initialize(client) ⇒ Site
Returns a new instance of Site.
12 13 14 15 16 |
# File 'lib/dato/local/site.rb', line 12 def initialize(client) @client = client @entities_repo = EntitiesRepo.new @items_repo = ItemsRepo.new(@entities_repo) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
8 9 10 |
# File 'lib/dato/local/site.rb', line 8 def client @client end |
#entities_repo ⇒ Object (readonly)
Returns the value of attribute entities_repo.
9 10 11 |
# File 'lib/dato/local/site.rb', line 9 def entities_repo @entities_repo end |
#items_repo ⇒ Object (readonly)
Returns the value of attribute items_repo.
10 11 12 |
# File 'lib/dato/local/site.rb', line 10 def items_repo @items_repo end |
Instance Method Details
#entity ⇒ Object
23 24 25 |
# File 'lib/dato/local/site.rb', line 23 def entity @entities_repo.find_entities_of_type('site').first end |
#load ⇒ Object
18 19 20 21 |
# File 'lib/dato/local/site.rb', line 18 def load @entities_repo = EntitiesRepo.new(site, all_items) @items_repo = ItemsRepo.new(@entities_repo) end |