Class: Infrataster::Resources::BaseResource

Inherits:
Object
  • Object
show all
Defined in:
lib/infrataster/resources/base_resource.rb

Direct Known Subclasses

CapybaraResource, HttpResource

Instance Method Summary collapse

Instance Method Details

#context_classObject



9
10
11
# File 'lib/infrataster/resources/base_resource.rb', line 9

def context_class
  Contexts.const_get("#{name}Context")
end

#nameObject

do nothing



5
6
7
# File 'lib/infrataster/resources/base_resource.rb', line 5

def name
  self.class.name.split('::').last[0...(-1 * 'Resource'.size)]
end