Class: Sunlight::Issue

Inherits:
Base
  • Object
show all
Defined in:
lib/sunlight/issue.rb

Constant Summary

Constants inherited from Base

Base::API_FORMAT, Base::API_URL

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



4
5
6
# File 'lib/sunlight/issue.rb', line 4

def code
  @code
end

#specific_issueObject

Returns the value of attribute specific_issue.



4
5
6
# File 'lib/sunlight/issue.rb', line 4

def specific_issue
  @specific_issue
end