Class: TemplateBuilder::App::Helper::Gem

Inherits:
Object
  • Object
show all
Defined in:
lib/template_builder/app/helper/framework.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



52
53
54
# File 'lib/template_builder/app/helper/framework.rb', line 52

def action
  @action
end

#nameObject (readonly)

Returns the value of attribute name.



52
53
54
# File 'lib/template_builder/app/helper/framework.rb', line 52

def name
  @name
end

#sourceObject (readonly)

Returns the value of attribute source.



52
53
54
# File 'lib/template_builder/app/helper/framework.rb', line 52

def source
  @source
end

#versionObject (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_sObject



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