Class: Onebox::Engine::GithubGistOnebox::GistFile
- Inherits:
-
Object
- Object
- Onebox::Engine::GithubGistOnebox::GistFile
- Defined in:
- lib/onebox/engine/github_gist_onebox.rb
Constant Summary collapse
- MAX_LINES =
10
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(json) ⇒ GistFile
constructor
A new instance of GistFile.
- #truncated? ⇒ Boolean
Constructor Details
#initialize(json) ⇒ GistFile
Returns a new instance of GistFile.
59 60 61 62 63 |
# File 'lib/onebox/engine/github_gist_onebox.rb', line 59 def initialize(json) @json = json @filename = @json["filename"] @language = @json["language"] end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
54 55 56 |
# File 'lib/onebox/engine/github_gist_onebox.rb', line 54 def filename @filename end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
55 56 57 |
# File 'lib/onebox/engine/github_gist_onebox.rb', line 55 def language @language end |