Class: Slodd::Github
- Inherits:
-
Object
- Object
- Slodd::Github
- Defined in:
- lib/slodd/github.rb
Instance Attribute Summary collapse
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#path ⇒ Object
Returns the value of attribute path.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Github
constructor
A new instance of Github.
- #schema ⇒ Object
Constructor Details
#initialize(attrs) ⇒ Github
Returns a new instance of Github.
8 9 10 11 12 13 14 |
# File 'lib/slodd/github.rb', line 8 def initialize(attrs) self.owner = attrs.fetch(:owner) self.repo = attrs.fetch(:repo) self.token = attrs.fetch(:token) self.path = attrs.fetch(:path) self.ref = attrs[:ref] end |
Instance Attribute Details
#owner ⇒ Object
Returns the value of attribute owner.
6 7 8 |
# File 'lib/slodd/github.rb', line 6 def owner @owner end |
#path ⇒ Object
Returns the value of attribute path.
6 7 8 |
# File 'lib/slodd/github.rb', line 6 def path @path end |
#ref ⇒ Object
Returns the value of attribute ref.
6 7 8 |
# File 'lib/slodd/github.rb', line 6 def ref @ref end |
#repo ⇒ Object
Returns the value of attribute repo.
6 7 8 |
# File 'lib/slodd/github.rb', line 6 def repo @repo end |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/slodd/github.rb', line 6 def token @token end |
Instance Method Details
#schema ⇒ Object
16 17 18 |
# File 'lib/slodd/github.rb', line 16 def schema @schema ||= open(url, headers).read end |