Class: PrePackager::Package::Context
- Inherits:
-
Object
- Object
- PrePackager::Package::Context
- Defined in:
- lib/pre-packager.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#local_base ⇒ Object
readonly
Returns the value of attribute local_base.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(base, interpolator, opts) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(base, interpolator, opts) ⇒ Context
Returns a new instance of Context.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/pre-packager.rb', line 77 def initialize base, interpolator, opts @base = base @interpolator = interpolator real_target = "./$name#{base}" real_target = "#{real_target}/$name" if opts[:use_name] @local_base = @interpolator.value_for real_target @name = @interpolator.value_for '$name' @root = File.join @local_base, '..', '..' end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
75 76 77 |
# File 'lib/pre-packager.rb', line 75 def base @base end |
#local_base ⇒ Object (readonly)
Returns the value of attribute local_base.
75 76 77 |
# File 'lib/pre-packager.rb', line 75 def local_base @local_base end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
75 76 77 |
# File 'lib/pre-packager.rb', line 75 def name @name end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
75 76 77 |
# File 'lib/pre-packager.rb', line 75 def root @root end |