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, :branch]
Constants included from Nilavu::MegamAttributes
Nilavu::MegamAttributes::KEY, Nilavu::MegamAttributes::VALUE
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#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
91 92 93 94 95 96 97 98 |
# File 'lib/megam/mixins/components.rb', line 91 def initialize(params) set_attributes(params) @type = params[:type] || "" @source = params[:scm_name] || "" @url = params[:source] || "" @oneclick = params[:oneclick] || "" @branch = params[:scmbranch] || "" end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
79 80 81 |
# File 'lib/megam/mixins/components.rb', line 79 def branch @branch end |
#oneclick ⇒ Object (readonly)
Returns the value of attribute oneclick.
79 80 81 |
# File 'lib/megam/mixins/components.rb', line 79 def oneclick @oneclick end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
79 80 81 |
# File 'lib/megam/mixins/components.rb', line 79 def source @source end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
79 80 81 |
# File 'lib/megam/mixins/components.rb', line 79 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
79 80 81 |
# File 'lib/megam/mixins/components.rb', line 79 def url @url end |
Instance Method Details
#attributes ⇒ Object
87 88 89 |
# File 'lib/megam/mixins/components.rb', line 87 def attributes ATTRIBUTES end |
#tohash ⇒ Object
100 101 102 103 104 105 106 107 |
# File 'lib/megam/mixins/components.rb', line 100 def tohash { rtype: @type, source: @source, oneclick: @oneclick, url: @url, branch: @branch } end |