Module: Wayaku
- Defined in:
- lib/wayaku.rb,
lib/wayaku/version.rb
Constant Summary collapse
- VERSION =
'0.1.4'
Instance Method Summary collapse
Instance Method Details
#wayaku ⇒ Object
8 9 10 11 |
# File 'lib/wayaku.rb', line 8 def wayaku array = [model_name.human, model_name.singular, parse_attribute(column_names)] puts format(array) end |
#wayaku_enum(attr) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/wayaku.rb', line 13 def wayaku_enum(attr) unless enumerized_attributes[attr] puts "\e[38;5;196m知らない属性\e[0m" return end array = parse_attribute(attr) puts format(array) end |
#wayaku_logicals ⇒ Object
22 23 24 25 26 |
# File 'lib/wayaku.rb', line 22 def wayaku_logicals array = parse_attribute(column_names) array = format(array) puts array.each_slice(2).map(&:first) end |
#wayaku_physicals ⇒ Object
28 29 30 31 32 |
# File 'lib/wayaku.rb', line 28 def wayaku_physicals array = parse_attribute(column_names) array = format(array) puts array.each_slice(2).map(&:second) end |