Class: Coopy::Flavor
- Inherits:
-
Object
- Object
- Coopy::Flavor
- Defined in:
- lib/coopy.rb
Instance Attribute Summary collapse
-
#banner ⇒ Object
Returns the value of attribute banner.
-
#key ⇒ Object
Returns the value of attribute key.
-
#min_length ⇒ Object
Returns the value of attribute min_length.
Instance Method Summary collapse
- #can_choose_format? ⇒ Boolean
- #can_set_output? ⇒ Boolean
- #default_format ⇒ Object
- #sql_object? ⇒ Boolean
- #sql_subject? ⇒ Boolean
Instance Attribute Details
#banner ⇒ Object
Returns the value of attribute banner.
7 8 9 |
# File 'lib/coopy.rb', line 7 def end |
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/coopy.rb', line 6 def key @key end |
#min_length ⇒ Object
Returns the value of attribute min_length.
8 9 10 |
# File 'lib/coopy.rb', line 8 def min_length @min_length end |
Instance Method Details
#can_choose_format? ⇒ Boolean
18 19 20 |
# File 'lib/coopy.rb', line 18 def can_choose_format? key != :patch end |
#can_set_output? ⇒ Boolean
22 23 24 |
# File 'lib/coopy.rb', line 22 def can_set_output? key != :patch end |
#default_format ⇒ Object
26 27 28 |
# File 'lib/coopy.rb', line 26 def default_format (key==:patch) ? :apply : :csv end |
#sql_object? ⇒ Boolean
14 15 16 |
# File 'lib/coopy.rb', line 14 def sql_object? key == :diff end |
#sql_subject? ⇒ Boolean
10 11 12 |
# File 'lib/coopy.rb', line 10 def sql_subject? [:diff,:patch].include? key end |