Class: ColonelKurtz::Block::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/colonel_kurtz/block/type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject (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_typeObject



15
16
17
# File 'lib/colonel_kurtz/block/type.rb', line 15

def formatted_type
  type.gsub("-", "_").downcase
end

#to_symObject



19
20
21
# File 'lib/colonel_kurtz/block/type.rb', line 19

def to_sym
  formatted_type.to_sym
end