Class: Aspen::Adapters::Adapter
- Inherits:
-
Object
- Object
- Aspen::Adapters::Adapter
- Defined in:
- lib/aspen/adapters.rb
Instance Attribute Summary collapse
-
#ext ⇒ Object
readonly
Returns the value of attribute ext.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#renderer ⇒ Object
readonly
Returns the value of attribute renderer.
Instance Method Summary collapse
-
#initialize(id:, name:, ext:) ⇒ Adapter
constructor
A new instance of Adapter.
Constructor Details
#initialize(id:, name:, ext:) ⇒ Adapter
Returns a new instance of Adapter.
7 8 9 10 11 12 13 |
# File 'lib/aspen/adapters.rb', line 7 def initialize(id: , name: , ext: ) @id = id @name = name @ext = ext # @todo This will be buggy if we have a two-word class @renderer = Kernel.const_get("Aspen::Renderers::#{@name.downcase.capitalize}Renderer") end |
Instance Attribute Details
#ext ⇒ Object (readonly)
Returns the value of attribute ext.
5 6 7 |
# File 'lib/aspen/adapters.rb', line 5 def ext @ext end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/aspen/adapters.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/aspen/adapters.rb', line 5 def name @name end |
#renderer ⇒ Object (readonly)
Returns the value of attribute renderer.
5 6 7 |
# File 'lib/aspen/adapters.rb', line 5 def renderer @renderer end |