Class: Megam::Mixins::Repo
- Inherits:
-
Object
- Object
- Megam::Mixins::Repo
- Includes:
- Nilavu::MegamAttributes
- Defined in:
- lib/megam/mixins/components.rb
Constant Summary collapse
- ATTRIBUTES =
[ :type, :source, :oneclick, :url]
Constants included from Nilavu::MegamAttributes
Nilavu::MegamAttributes::KEY, Nilavu::MegamAttributes::VALUE
Instance Attribute Summary collapse
-
#oneclick ⇒ Object
readonly
Returns the value of attribute oneclick.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(params) ⇒ Repo
constructor
A new instance of Repo.
- #tohash ⇒ Object
Methods included from Nilavu::MegamAttributes
Constructor Details
#initialize(params) ⇒ Repo
Returns a new instance of Repo.
73 74 75 76 77 78 79 |
# File 'lib/megam/mixins/components.rb', line 73 def initialize(params) set_attributes(params) @type = params[:type] @source = params[:scm_name] @url = params[:source] @oneclick = params[:oneclick] end |
Instance Attribute Details
#oneclick ⇒ Object (readonly)
Returns the value of attribute oneclick.
62 63 64 |
# File 'lib/megam/mixins/components.rb', line 62 def oneclick @oneclick end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
62 63 64 |
# File 'lib/megam/mixins/components.rb', line 62 def source @source end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
62 63 64 |
# File 'lib/megam/mixins/components.rb', line 62 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
62 63 64 |
# File 'lib/megam/mixins/components.rb', line 62 def url @url end |
Instance Method Details
#attributes ⇒ Object
69 70 71 |
# File 'lib/megam/mixins/components.rb', line 69 def attributes ATTRIBUTES end |
#tohash ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/megam/mixins/components.rb', line 81 def tohash { :rtype => @type, :source => @source, :oneclick => @oneclick, :url => @url } end |