Class: Brightcontent::Resource

Inherits:
Struct
  • Object
show all
Defined in:
lib/brightcontent/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



4
5
6
# File 'lib/brightcontent/resource.rb', line 4

def path
  @path
end

Instance Method Details

#klassObject



5
6
7
8
9
# File 'lib/brightcontent/resource.rb', line 5

def klass
  path.classify.constantize
rescue
  "Brightcontent::#{path.classify}".constantize
end

#to_partial_pathObject



11
12
13
# File 'lib/brightcontent/resource.rb', line 11

def to_partial_path
  "application/resource"
end