Class: ActiveBugzilla::Flag
Instance Attribute Summary collapse
-
#active ⇒ Object
(also: #active?)
readonly
Returns the value of attribute active.
-
#bug_id ⇒ Object
readonly
Returns the value of attribute bug_id.
-
#created_on ⇒ Object
readonly
Returns the value of attribute created_on.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#setter ⇒ Object
readonly
Returns the value of attribute setter.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
-
#updated_on ⇒ Object
readonly
Returns the value of attribute updated_on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Flag
constructor
A new instance of Flag.
Methods inherited from Base
Constructor Details
#initialize(attributes) ⇒ Flag
Returns a new instance of Flag.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_bugzilla/flag.rb', line 6 def initialize(attributes) @id = attributes['id'] @bug_id = attributes['bug_id'] @type_id = attributes['type_id'] @created_on = (attributes['creation_date']) @updated_on = (attributes['modification_date']) @status = attributes['status'] @name = attributes['name'] @setter = attributes['setter'] @active = attributes['is_active'] end |
Instance Attribute Details
#active ⇒ Object (readonly) Also known as: active?
Returns the value of attribute active.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def active @active end |
#bug_id ⇒ Object (readonly)
Returns the value of attribute bug_id.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def bug_id @bug_id end |
#created_on ⇒ Object (readonly)
Returns the value of attribute created_on.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def created_on @created_on end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def name @name end |
#setter ⇒ Object (readonly)
Returns the value of attribute setter.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def setter @setter end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def status @status end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def type_id @type_id end |
#updated_on ⇒ Object (readonly)
Returns the value of attribute updated_on.
3 4 5 |
# File 'lib/active_bugzilla/flag.rb', line 3 def updated_on @updated_on end |
Class Method Details
.instantiate_from_raw_data(data, bug_id = nil) ⇒ Object
18 19 20 |
# File 'lib/active_bugzilla/flag.rb', line 18 def self.instantiate_from_raw_data(data, bug_id = nil) data.collect { |hash| new(hash.merge('bug_id' => bug_id)) } end |