Class: Lazylead::Fake
- Inherits:
-
Object
- Object
- Lazylead::Fake
- Defined in:
- lib/lazylead/system/fake.rb,
lib/lazylead/system/jira.rb
Overview
A fake jira system which allows to work with sub-tasks.
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#initialize(issues) ⇒ Fake
constructor
A new instance of Fake.
- #issues ⇒ Object
-
#raw {|OpenStruct.new(Issue: self)| ... } ⇒ Object
Execute request to the ticketing system using raw client.
Constructor Details
#initialize(issues) ⇒ Fake
Returns a new instance of Fake.
33 34 35 |
# File 'lib/lazylead/system/fake.rb', line 33 def initialize(issues = []) @issues = issues end |
Instance Method Details
#find(id) ⇒ Object
384 385 386 |
# File 'lib/lazylead/system/jira.rb', line 384 def find(id) @issues.detect { |i| i.id.eql? id } end |
#issues ⇒ Object
37 38 39 |
# File 'lib/lazylead/system/fake.rb', line 37 def issues(*) @issues end |
#raw {|OpenStruct.new(Issue: self)| ... } ⇒ Object
Execute request to the ticketing system using raw client.
379 380 381 382 |
# File 'lib/lazylead/system/jira.rb', line 379 def raw raise "ll-008: No block given to method" unless block_given? yield(OpenStruct.new(Issue: self)) end |