Class: Backlog::Object::FindCondition

Inherits:
Serializable show all
Defined in:
lib/backlog/object.rb

Constant Summary collapse

CONDITION_KEYS =
%w[
  projectId
  issueTypeId
  issueType
  componentId
  versionId
  milestoneId
  statusId
  priorityId
  assignerId
  createdUserId
  resolutionId
  created_on_min
  created_on_max
  updated_on_min
  updated_on_max
].each {|k|
  class_eval { attr_reader k.to_sym }
}

Instance Method Summary collapse

Methods inherited from Serializable

#to_h

Constructor Details

#initialize(condition) ⇒ FindCondition

Returns a new instance of FindCondition.



236
237
238
239
240
241
242
243
244
# File 'lib/backlog/object.rb', line 236

def initialize(condition)
  condition.each {|k, v|
    self.instance_eval %Q{
      if CONDITION_KEYS.include? k
        @#{k} = v
      end
    }
  }
end