Class: SublimeDSL::SublimeText::Package::Reader
- Inherits:
-
Object
- Object
- SublimeDSL::SublimeText::Package::Reader
- Defined in:
- lib/sublime_dsl/sublime_text/package/reader.rb
Overview
A DSL read operation with its options.
Instance Attribute Summary collapse
-
#alt_root ⇒ Object
Returns the value of attribute alt_root.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#include ⇒ Object
Returns the value of attribute include.
-
#package_name ⇒ Object
readonly
Returns the value of attribute package_name.
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
- #dir ⇒ Object
-
#initialize(name) ⇒ Reader
constructor
A new instance of Reader.
- #package ⇒ Object
Constructor Details
#initialize(name) ⇒ Reader
Returns a new instance of Reader.
15 16 17 18 19 20 21 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 15 def initialize(name) @package_name = name @root = '.' @alt_root = nil @include = nil @exclude = '*.keyboard.rb' end |
Instance Attribute Details
#alt_root ⇒ Object
Returns the value of attribute alt_root.
13 14 15 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 13 def alt_root @alt_root end |
#exclude ⇒ Object
Returns the value of attribute exclude.
13 14 15 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 13 def exclude @exclude end |
#include ⇒ Object
Returns the value of attribute include.
13 14 15 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 13 def include @include end |
#package_name ⇒ Object (readonly)
Returns the value of attribute package_name.
12 13 14 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 12 def package_name @package_name end |
#root ⇒ Object
Returns the value of attribute root.
13 14 15 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 13 def root @root end |
Instance Method Details
#dir ⇒ Object
23 24 25 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 23 def dir "#{root}/#{package_name}" end |
#package ⇒ Object
27 28 29 |
# File 'lib/sublime_dsl/sublime_text/package/reader.rb', line 27 def package @package ||= read end |