Class: RubyCms::Manifest::Builder
- Inherits:
-
Object
- Object
- RubyCms::Manifest::Builder
- Defined in:
- lib/ruby_cms/manifest.rb
Overview
Collects one module's declarations via the DSL block.
Instance Method Summary collapse
- #description(text) ⇒ Object
- #files(list) ⇒ Object
- #gems(hash) ⇒ Object
-
#initialize(key, base, depends_on) ⇒ Builder
constructor
A new instance of Builder.
- #migrations(list) ⇒ Object
- #nav(path) ⇒ Object
- #permissions(list) ⇒ Object
- #routes(path) ⇒ Object
- #to_module ⇒ Object
Constructor Details
#initialize(key, base, depends_on) ⇒ Builder
Returns a new instance of Builder.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruby_cms/manifest.rb', line 15 def initialize(key, base, depends_on) @key = key @base = base @depends_on = depends_on @files = [] @routes = nil @nav = nil @permissions = [] @migrations = [] @gems = {} @description = nil end |
Instance Method Details
#description(text) ⇒ Object
34 |
# File 'lib/ruby_cms/manifest.rb', line 34 def description(text) = (@description = text) |
#files(list) ⇒ Object
28 |
# File 'lib/ruby_cms/manifest.rb', line 28 def files(list) = @files.concat(Array(list)) |
#gems(hash) ⇒ Object
33 |
# File 'lib/ruby_cms/manifest.rb', line 33 def gems(hash) = @gems.merge!(hash) |
#migrations(list) ⇒ Object
32 |
# File 'lib/ruby_cms/manifest.rb', line 32 def migrations(list) = @migrations.concat(Array(list)) |
#nav(path) ⇒ Object
30 |
# File 'lib/ruby_cms/manifest.rb', line 30 def nav(path) = (@nav = path) |
#permissions(list) ⇒ Object
31 |
# File 'lib/ruby_cms/manifest.rb', line 31 def (list) = @permissions.concat(Array(list)) |
#routes(path) ⇒ Object
29 |
# File 'lib/ruby_cms/manifest.rb', line 29 def routes(path) = (@routes = path) |