Module: MM::API
- Defined in:
- lib/mm.rb
Instance Method Summary collapse
- #create_transition_execution(attrs) ⇒ Object
- #execute_cmd(cmd) ⇒ Object
- #favorites ⇒ Object
- #find_card(options) ⇒ Object
- #find_card_by_number(number) ⇒ Object
- #find_cards(options) ⇒ Object
- #init(klass) ⇒ Object
- #property_definitions ⇒ Object
- #team_members ⇒ Object
Instance Method Details
#create_transition_execution(attrs) ⇒ Object
51 52 53 54 |
# File 'lib/mm.rb', line 51 def create_transition_execution(attrs) init(Resource::TransitionExecution) Resource::TransitionExecution.create(attrs) end |
#execute_cmd(cmd) ⇒ Object
75 76 77 |
# File 'lib/mm.rb', line 75 def execute_cmd(cmd) %x[#{cmd}] end |
#favorites ⇒ Object
46 47 48 49 |
# File 'lib/mm.rb', line 46 def favorites init(Resource::Favorite) Resource::Favorite.find(:all) end |
#find_card(options) ⇒ Object
56 57 58 59 |
# File 'lib/mm.rb', line 56 def find_card() init(Resource::Card) Resource::Card.find(:first, ) end |
#find_card_by_number(number) ⇒ Object
61 62 63 64 |
# File 'lib/mm.rb', line 61 def find_card_by_number(number) init(Resource::Card) Resource::Card.find(number) end |
#find_cards(options) ⇒ Object
66 67 68 69 |
# File 'lib/mm.rb', line 66 def find_cards() init(Resource::Card) Resource::Card.find(:all, :params => ) end |
#init(klass) ⇒ Object
71 72 73 |
# File 'lib/mm.rb', line 71 def init(klass) Command::Init.new.do_once(klass) end |
#property_definitions ⇒ Object
40 41 42 43 44 |
# File 'lib/mm.rb', line 40 def property_definitions return @property_definitions if defined?(@property_definitions) init(Resource::PropertyDefinition) @property_definitions = Resource::PropertyDefinition.find(:all) end |