Class: Amber::View

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

Direct Known Subclasses

Json

Defined Under Namespace

Classes: Json

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = 404, header = {}, content = nil) ⇒ View

Returns a new instance of View.



4
5
6
7
8
# File 'lib/amber/view.rb', line 4

def initialize(code = 404, header = {}, content = nil)
  @code = code
  @header = header
  @content = content
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



2
3
4
# File 'lib/amber/view.rb', line 2

def code
  @code
end

#contentObject

Returns the value of attribute content.



2
3
4
# File 'lib/amber/view.rb', line 2

def content
  @content
end

#headerObject

Returns the value of attribute header.



2
3
4
# File 'lib/amber/view.rb', line 2

def header
  @header
end