Class: Sunlight::Issue
Constant Summary
Constants inherited from Base
Base::API_FORMAT, Base::API_URL
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#specific_issue ⇒ Object
Returns the value of attribute specific_issue.
Instance Method Summary collapse
-
#initialize(params) ⇒ Issue
constructor
Takes in a hash where the keys are strings (the format passed in by the JSON parser).
Methods inherited from Base
api_key, api_key=, construct_url, get_json_data, hash2get
Constructor Details
#initialize(params) ⇒ Issue
Takes in a hash where the keys are strings (the format passed in by the JSON parser)
8 9 10 11 12 |
# File 'lib/sunlight/issue.rb', line 8 def initialize(params) params.each do |key, value| instance_variable_set("@#{key}", value) if Issue.instance_methods.include? key end end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/sunlight/issue.rb', line 4 def code @code end |
#specific_issue ⇒ Object
Returns the value of attribute specific_issue.
4 5 6 |
# File 'lib/sunlight/issue.rb', line 4 def specific_issue @specific_issue end |