Class: Trocla::Formats::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/trocla/formats.rb

Overview

Base

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(trocla) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/trocla/formats.rb', line 9

def initialize(trocla)
  @trocla = trocla
end

Instance Attribute Details

#troclaObject (readonly)

Returns the value of attribute trocla.



7
8
9
# File 'lib/trocla/formats.rb', line 7

def trocla
  @trocla
end

Class Method Details

.expensive(is_expensive) ⇒ Object



21
22
23
# File 'lib/trocla/formats.rb', line 21

def expensive(is_expensive)
  @expensive = is_expensive
end

.expensive?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/trocla/formats.rb', line 25

def expensive?
  @expensive == true
end

Instance Method Details

#expensive?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/trocla/formats.rb', line 17

def expensive?
  self.class.expensive?
end

#render(output, render_options = {}) ⇒ Object



13
14
15
# File 'lib/trocla/formats.rb', line 13

def render(output, render_options = {})
  output
end