Class: SpudBlogConfig
- Inherits:
-
Object
- Object
- SpudBlogConfig
- Defined in:
- app/models/spud_blog_config.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, key:, path:, layout: nil) ⇒ SpudBlogConfig
constructor
A new instance of SpudBlogConfig.
Constructor Details
#initialize(name:, key:, path:, layout: nil) ⇒ SpudBlogConfig
Returns a new instance of SpudBlogConfig.
19 20 21 22 23 24 |
# File 'app/models/spud_blog_config.rb', line 19 def initialize(name:, key:, path:, layout: nil) @name = name @key = key @path = path @layout = layout || Spud::Blog.config.base_layout end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
17 18 19 |
# File 'app/models/spud_blog_config.rb', line 17 def key @key end |
#layout ⇒ Object
Returns the value of attribute layout.
17 18 19 |
# File 'app/models/spud_blog_config.rb', line 17 def layout @layout end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'app/models/spud_blog_config.rb', line 17 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
17 18 19 |
# File 'app/models/spud_blog_config.rb', line 17 def path @path end |
Class Method Details
.each ⇒ Object
11 12 13 14 15 |
# File 'app/models/spud_blog_config.rb', line 11 def self.each Spud::Blog.config.blogs.each do |config| yield(config) end end |