Class: Coopy::Flavor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Returns the value of attribute banner.



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

def banner
  @banner
end

#keyObject

Returns the value of attribute key.



6
7
8
# File 'lib/coopy.rb', line 6

def key
  @key
end

#min_lengthObject

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

Returns:

  • (Boolean)


18
19
20
# File 'lib/coopy.rb', line 18

def can_choose_format?
  key != :patch
end

#can_set_output?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/coopy.rb', line 22

def can_set_output?
  key != :patch
end

#default_formatObject



26
27
28
# File 'lib/coopy.rb', line 26

def default_format
  (key==:patch) ? :apply : :csv
end

#sql_object?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/coopy.rb', line 14

def sql_object?
  key == :diff
end

#sql_subject?Boolean

Returns:

  • (Boolean)


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

def sql_subject?
  [:diff,:patch].include? key
end