Class: Dope::View

Inherits:
Object
  • Object
show all
Defined in:
lib/dope/core/view.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ View

Returns a new instance of View.



5
6
7
# File 'lib/dope/core/view.rb', line 5

def initialize(resource)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



4
5
6
# File 'lib/dope/core/view.rb', line 4

def resource
  @resource
end

Instance Method Details

#render(ctx) ⇒ Object



9
10
11
# File 'lib/dope/core/view.rb', line 9

def render(ctx)
  "hello from #{self} for #{resource} in #{ctx}"
end