Class: Metadata::Formats::Base

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers
Defined in:
lib/metadata/formats/base.rb

Direct Known Subclasses

JSON, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, &block) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
14
# File 'lib/metadata/formats/base.rb', line 9

def initialize(object, &block)
  @output = []        
  @object = object
  
  instance_exec(@object, &block)
end

Instance Attribute Details

#objectObject

Returns the value of attribute object.



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

def object
  @object
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/metadata/formats/base.rb', line 6

def output
  @output
end

Instance Method Details

#about(*args) ⇒ Object



33
34
# File 'lib/metadata/formats/base.rb', line 33

def about(*args)
end

#around(*args) ⇒ Object



30
31
# File 'lib/metadata/formats/base.rb', line 30

def around(*args)
end

#is(*args) ⇒ Object



21
22
# File 'lib/metadata/formats/base.rb', line 21

def is(*args)
end

#it(*args) ⇒ Object



27
28
# File 'lib/metadata/formats/base.rb', line 27

def it(*args)
end

#puts(str) ⇒ Object



16
17
18
19
# File 'lib/metadata/formats/base.rb', line 16

def puts(str)
  str = str.capitalize if @output.empty?
  @output << str
end

#stopObject



39
40
# File 'lib/metadata/formats/base.rb', line 39

def stop
end

#was(*args) ⇒ Object



24
25
# File 'lib/metadata/formats/base.rb', line 24

def was(*args)
end

#with(*args) ⇒ Object



36
37
# File 'lib/metadata/formats/base.rb', line 36

def with(*args)
end