Class: TemplateBuilder::App::Helper::Gem
- Inherits:
-
Object
- Object
- TemplateBuilder::App::Helper::Gem
- Defined in:
- lib/template_builder/app/helper/framework.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Gem
constructor
A new instance of Gem.
- #to_s ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Gem
Returns a new instance of Gem.
53 54 55 56 57 58 |
# File 'lib/template_builder/app/helper/framework.rb', line 53 def initialize(opts = {}) @version = opts[:version] @source = opts[:source] @name = opts[:name] @action = opts[:action] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
52 53 54 |
# File 'lib/template_builder/app/helper/framework.rb', line 52 def action @action end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
52 53 54 |
# File 'lib/template_builder/app/helper/framework.rb', line 52 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
52 53 54 |
# File 'lib/template_builder/app/helper/framework.rb', line 52 def source @source end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
52 53 54 |
# File 'lib/template_builder/app/helper/framework.rb', line 52 def version @version end |
Instance Method Details
#to_s ⇒ Object
60 61 62 63 64 65 |
# File 'lib/template_builder/app/helper/framework.rb', line 60 def to_s gem = "'"+@name+"'" gem += ", '"+@version+"'" if @version gem += ", :"+@source+"" if @source gem end |