Class: Octokit::Gist
- Inherits:
-
Object
- Object
- Octokit::Gist
- Defined in:
- lib/octokit/gist.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gist) ⇒ Gist
constructor
A new instance of Gist.
- #to_s ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(gist) ⇒ Gist
Returns a new instance of Gist.
11 12 13 14 15 16 |
# File 'lib/octokit/gist.rb', line 11 def initialize(gist) case gist when Fixnum, String @id = gist.to_s end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/octokit/gist.rb', line 5 def id @id end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/octokit/gist.rb', line 18 def to_s @id end |
#url ⇒ Object
22 23 24 |
# File 'lib/octokit/gist.rb', line 22 def url "https://gist.github.com/#{@id}" end |