Class: TwitterJekyll::ErrorResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-twitter-plugin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



138
139
140
# File 'lib/jekyll-twitter-plugin.rb', line 138

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



136
137
138
# File 'lib/jekyll-twitter-plugin.rb', line 136

def error
  @error
end

Instance Method Details

#htmlObject



142
143
144
# File 'lib/jekyll-twitter-plugin.rb', line 142

def html
  "<p>#{@error}</p>"
end

#to_hObject



146
147
148
# File 'lib/jekyll-twitter-plugin.rb', line 146

def to_h
  { html: html }
end