Class: Metadata::Formats::Base
- Inherits:
-
Object
- Object
- Metadata::Formats::Base
- Includes:
- ActionView::Helpers
- Defined in:
- lib/metadata/formats/base.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #about(*args) ⇒ Object
- #around(*args) ⇒ Object
-
#initialize(object, &block) ⇒ Base
constructor
A new instance of Base.
- #is(*args) ⇒ Object
- #it(*args) ⇒ Object
- #puts(str) ⇒ Object
- #stop ⇒ Object
- #was(*args) ⇒ Object
- #with(*args) ⇒ Object
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
#object ⇒ Object
Returns the value of attribute object.
7 8 9 |
# File 'lib/metadata/formats/base.rb', line 7 def object @object end |
#output ⇒ Object
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 |
#stop ⇒ Object
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 |