Module: Guacamole::Edge::ClassMethods

Defined in:
lib/guacamole/edge.rb

Instance Method Summary collapse

Instance Method Details

#from(collection_name = nil) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/guacamole/edge.rb', line 49

def from(collection_name = nil)
  if collection_name.nil?
    @from
  else
    @from = collection_name
  end
end

#from_collectionObject



69
70
71
# File 'lib/guacamole/edge.rb', line 69

def from_collection
  [from.to_s.camelcase, 'Collection'].join('').constantize
end

#to(collection_name = nil) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/guacamole/edge.rb', line 57

def to(collection_name = nil)
  if collection_name.nil?
    @to
  else
    @to = collection_name
  end
end

#to_collectionObject



65
66
67
# File 'lib/guacamole/edge.rb', line 65

def to_collection
  [to.to_s.camelcase, 'Collection'].join('').constantize
end