Module: Incept::Package
- Included in:
- MultipleOptionPackage, SingleOptionPackage
- Defined in:
- lib/incept/package.rb
Class Method Summary collapse
Instance Method Summary collapse
- #command_options ⇒ Object
- #initialize(type, options) ⇒ Object
- #render(type) ⇒ Object
- #template ⇒ Object
- #template_path ⇒ Object
Class Method Details
.included(other) ⇒ Object
4 5 6 7 8 |
# File 'lib/incept/package.rb', line 4 def self.included(other) other.class_eval do attr_reader :selection end end |
Instance Method Details
#command_options ⇒ Object
27 28 29 |
# File 'lib/incept/package.rb', line 27 def template.render(:options) end |
#initialize(type, options) ⇒ Object
10 11 12 13 |
# File 'lib/incept/package.rb', line 10 def initialize(type, ) @type = type = end |
#render(type) ⇒ Object
23 24 25 |
# File 'lib/incept/package.rb', line 23 def render(type) template.render(type) end |
#template ⇒ Object
19 20 21 |
# File 'lib/incept/package.rb', line 19 def template @template ||= Template.new(template_path) end |
#template_path ⇒ Object
15 16 17 |
# File 'lib/incept/package.rb', line 15 def template_path File.("../../../templates/#{@type}/#{selected_package_name.downcase}", __FILE__) end |