Class: GithubApi::Blob
- Inherits:
-
Object
- Object
- GithubApi::Blob
- Defined in:
- lib/github-api/other.rb
Overview
Blob class
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Blob
constructor
A new instance of Blob.
- #to_hash ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Blob
Returns a new instance of Blob.
83 84 85 86 |
# File 'lib/github-api/other.rb', line 83 def initialize(attributes={}) @encoding = "utf-8" attributes.each { |key, val| send("#{key}=", val) if respond_to?("#{key}=") } end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
81 82 83 |
# File 'lib/github-api/other.rb', line 81 def content @content end |
#encoding ⇒ Object
Returns the value of attribute encoding.
81 82 83 |
# File 'lib/github-api/other.rb', line 81 def encoding @encoding end |
#path ⇒ Object
Returns the value of attribute path.
81 82 83 |
# File 'lib/github-api/other.rb', line 81 def path @path end |
Instance Method Details
#to_hash ⇒ Object
88 89 90 91 92 93 94 95 |
# File 'lib/github-api/other.rb', line 88 def to_hash { :type => "blob", :path => @path, :content => @content, :encoding => @encoding } end |