class Rlaunchpadlib::Project
Attributes
branch_data[RW]
bug_data[RW]
merge_proposal_data[RW]
overview_data[RW]
project[RW]
subscription_data[RW]
timeline_data[RW]
Public Class Methods
new(project)
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 13 def initialize(project) @project = project @client = Rlaunchpadlib::Client.new end
Public Instance Methods
branches()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 35 def branches if @branch_data.nil? @branch_data = @client.get(@project, 'getBranches') end @branch_data end
bugs()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 27 def bugs if @bug_data.nil? @bug_data = @client.get(@project, 'searchTasks') end @bug_data end
clear_cache()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 65 def clear_cache @overview_data = nil @subscription_data = nil @branch_data = nil @merge_proposal_data = nil @bug_data = nil @timeline_data = nil end
merge_proposals()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 43 def merge_proposals if @merge_proposal_data.nil? @merge_proposal_data = @client.get(@project, 'getMergeProposals') end @merge_proposal_data end
method_missing(name, *args, &block)
click to toggle source
I’m nuts so lets patch method missing.
Calls superclass method
# File lib/rlaunchpadlib/project.rb, line 77 def method_missing(name, *args, &block) overview.has_key?(name.to_s) ? overview[name.to_s] : super end
overview()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 18 def overview if @overview_data.nil? @client.get(@project) else @overview_data end end
subscriptions()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 50 def subscriptions if @subscription_data.nil? @subscription_data = @client.get(@project, 'getSubscriptions') end @subscription_data end
timeline()
click to toggle source
# File lib/rlaunchpadlib/project.rb, line 57 def timeline if @timeline_data.nil? @timeline_data = @client.get(@project, 'get_timeline') end @timeline_data end