Class: Infold::Views::ShowWriter

Inherits:
BaseWriter show all
Defined in:
lib/infold/writers/views/show_writer.rb

Instance Attribute Summary collapse

Attributes inherited from BaseWriter

#resource

Instance Method Summary collapse

Methods inherited from BaseWriter

#field_display_code

Methods inherited from BaseWriter

#edit_path, #indent, #index_path, #new_path, #resource_name, #show_path

Constructor Details

#initialize(resource, app_title = nil) ⇒ ShowWriter

Returns a new instance of ShowWriter.



8
9
10
11
# File 'lib/infold/writers/views/show_writer.rb', line 8

def initialize(resource, app_title=nil)
  @resource = resource
  @app_title = app_title || @resource.name
end

Instance Attribute Details

#app_titleObject (readonly)

Returns the value of attribute app_title.



6
7
8
# File 'lib/infold/writers/views/show_writer.rb', line 6

def app_title
  @app_title
end

Instance Method Details

#show_fieldsObject



13
# File 'lib/infold/writers/views/show_writer.rb', line 13

def show_fields; @resource.show_fields end