Class: ComponentLibrary::Configuration
- Inherits:
-
Object
- Object
- ComponentLibrary::Configuration
- Defined in:
- lib/component_library.rb
Instance Attribute Summary collapse
-
#application_css ⇒ Object
Returns the value of attribute application_css.
-
#multiconfigure ⇒ Object
Returns the value of attribute multiconfigure.
-
#root_directory ⇒ Object
Returns the value of attribute root_directory.
-
#root_path ⇒ Object
Returns the value of attribute root_path.
Instance Method Summary collapse
- #for(filter) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #root_paths ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
38 39 40 41 42 |
# File 'lib/component_library.rb', line 38 def initialize @root_path = "components" @root_directory = "component" @application_css = "application" end |
Instance Attribute Details
#application_css ⇒ Object
Returns the value of attribute application_css.
35 36 37 |
# File 'lib/component_library.rb', line 35 def application_css @application_css end |
#multiconfigure ⇒ Object
Returns the value of attribute multiconfigure.
36 37 38 |
# File 'lib/component_library.rb', line 36 def multiconfigure @multiconfigure end |
#root_directory ⇒ Object
Returns the value of attribute root_directory.
33 34 35 |
# File 'lib/component_library.rb', line 33 def root_directory @root_directory end |
#root_path ⇒ Object
Returns the value of attribute root_path.
34 35 36 |
# File 'lib/component_library.rb', line 34 def root_path @root_path end |
Instance Method Details
#for(filter) ⇒ Object
49 50 51 52 |
# File 'lib/component_library.rb', line 49 def for(filter) return multiconfigure.select {|mc| mc[:root_path] == filter } if multiconfigure.present? [{ :root_path => @root_path, :root_directory => @root_directory, :application_css => @application_css }] end |
#root_paths ⇒ Object
44 45 46 47 |
# File 'lib/component_library.rb', line 44 def root_paths return multiconfigure.map{|mc| mc[:root_path]} if multiconfigure.present? [@root_path] end |