Class: Lono::Jadespec
- Inherits:
-
Object
- Object
- Lono::Jadespec
- Extended by:
- Memoist
- Defined in:
- lib/lono/jadespec.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#source_type ⇒ Object
readonly
Returns the value of attribute source_type.
Instance Method Summary collapse
- #auto_camelize ⇒ Object
- #exist? ⇒ Boolean
- #gemspec ⇒ Object
- #gemspec_file ⇒ Object
-
#initialize(root, source_type) ⇒ Jadespec
constructor
A new instance of Jadespec.
- #metadata ⇒ Object
- #template_type ⇒ Object
Constructor Details
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
9 10 11 |
# File 'lib/lono/jadespec.rb', line 9 def from @from end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
10 11 12 |
# File 'lib/lono/jadespec.rb', line 10 def root @root end |
#source_type ⇒ Object (readonly)
Returns the value of attribute source_type.
10 11 12 |
# File 'lib/lono/jadespec.rb', line 10 def source_type @source_type end |
Instance Method Details
#auto_camelize ⇒ Object
32 33 34 |
# File 'lib/lono/jadespec.rb', line 32 def auto_camelize [:auto_camelize] || false end |
#exist? ⇒ Boolean
15 16 17 |
# File 'lib/lono/jadespec.rb', line 15 def exist? !!gemspec_file end |
#gemspec ⇒ Object
19 20 21 |
# File 'lib/lono/jadespec.rb', line 19 def gemspec Gem::Specification::load(gemspec_file) end |
#gemspec_file ⇒ Object
24 25 26 |
# File 'lib/lono/jadespec.rb', line 24 def gemspec_file Dir.glob("#{@root}/*.gemspec").first end |
#metadata ⇒ Object
36 37 38 |
# File 'lib/lono/jadespec.rb', line 36 def gemspec..deep_symbolize_keys end |
#template_type ⇒ Object
28 29 30 |
# File 'lib/lono/jadespec.rb', line 28 def template_type [:template_type] || "dsl" end |