Class: ColonelKurtz::Block::Type
- Inherits:
-
Object
- Object
- ColonelKurtz::Block::Type
- Defined in:
- lib/colonel_kurtz/block/type.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #formatted_type ⇒ Object
-
#initialize(type) ⇒ Type
constructor
A new instance of Type.
- #to_sym ⇒ Object
Constructor Details
#initialize(type) ⇒ Type
Returns a new instance of Type.
11 12 13 |
# File 'lib/colonel_kurtz/block/type.rb', line 11 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/colonel_kurtz/block/type.rb', line 9 def type @type end |
Instance Method Details
#formatted_type ⇒ Object
15 16 17 |
# File 'lib/colonel_kurtz/block/type.rb', line 15 def formatted_type type.gsub("-", "_").downcase end |
#to_sym ⇒ Object
19 20 21 |
# File 'lib/colonel_kurtz/block/type.rb', line 19 def to_sym formatted_type.to_sym end |