Class: Issue

Inherits:
Object
  • Object
show all
Includes:
Meta
Defined in:
lib/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Meta

#create_method

Constructor Details

#initialize(issue, custom_fields, types) ⇒ Issue

Returns a new instance of Issue.



7
8
9
10
11
12
13
14
15
# File 'lib/issue.rb', line 7

def initialize(issue, custom_fields, types)
  @issue = issue
  @issue_type = get_type(types)
  custom_fields.each do |id, name|
    create_method(name) {
      custom_field(id)
    }
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object (private)



19
20
21
# File 'lib/issue.rb', line 19

def method_missing(m, *args, &block)
  @issue.send m
end

Instance Attribute Details

#issue_typeObject (readonly)

Returns the value of attribute issue_type.



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

def issue_type
  @issue_type
end