Class: Trello::AssociationInferTool

Inherits:
Object
  • Object
show all
Defined in:
lib/trello/association_infer_tool.rb

Class Method Summary collapse

Class Method Details

.infer_class_on_name(name) ⇒ Object



8
9
10
# File 'lib/trello/association_infer_tool.rb', line 8

def infer_class_on_name(name)
  Trello.const_get(name.to_s.singularize.camelize)
end

.infer_restful_resource_on_class(klass) ⇒ Object



4
5
6
# File 'lib/trello/association_infer_tool.rb', line 4

def infer_restful_resource_on_class(klass)
  klass.to_s.split('::').last.downcase.pluralize
end