class Clubhouse::Workflow

Public Class Methods

api_url() click to toggle source
# File lib/clubhouse2/workflow.rb, line 16
def self.api_url
        'workflows'
end
new(client:, object:) click to toggle source
Calls superclass method Clubhouse::ClubhouseResource::new
# File lib/clubhouse2/workflow.rb, line 7
def initialize(client:, object:)
        super
        @states = []
        object['states'].each do |this_state|
                this_state[:workflow_id] = @id
                @states << State.new(client: client, object: this_state)
        end
end
properties() click to toggle source
# File lib/clubhouse2/workflow.rb, line 3
def self.properties
        [ :created_at, :default_state_id, :description, :entity_type, :id, :name, :team_id, :updated_at ]
end

Public Instance Methods

state(**args) click to toggle source
# File lib/clubhouse2/workflow.rb, line 24
def state(**args); states(args).first; end
states(**args) click to toggle source
# File lib/clubhouse2/workflow.rb, line 20
def states(**args)
        @states.reject { |s| args.collect { |k,v| s.send(k) != v }.reduce(:|) }
end