Class: NumberedList::ItemValue

Inherits:
Object
  • Object
show all
Defined in:
lib/numbered_list/item_value.rb

Instance Method Summary collapse

Instance Method Details

#builder_method_nameObject



4
5
6
# File 'lib/numbered_list/item_value.rb', line 4

def builder_method_name
  method_name.to_sym
end

#method_nameObject



7
8
9
# File 'lib/numbered_list/item_value.rb', line 7

def method_name
  name.downcase.gsub(":", "_")
end

#query_method_nameObject



10
11
12
# File 'lib/numbered_list/item_value.rb', line 10

def query_method_name
  "#{method_name}?".to_sym
end

#to_item_descriptionObject



13
14
15
# File 'lib/numbered_list/item_value.rb', line 13

def to_item_description
  "#{formatted} :: #{description}"
end