Class: Summon::FacetCount

Inherits:
Schema show all
Defined in:
lib/summon/schema/facet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Schema

inherited

Instance Attribute Details

#applied?Object (readonly)

Returns the value of attribute applied?.



34
35
36
# File 'lib/summon/schema/facet.rb', line 34

def applied?
  @applied?
end

#apply_commandObject (readonly)

Returns the value of attribute apply_command.



36
37
38
# File 'lib/summon/schema/facet.rb', line 36

def apply_command
  @apply_command
end

#apply_negated_commandObject (readonly)

Returns the value of attribute apply_negated_command.



37
38
39
# File 'lib/summon/schema/facet.rb', line 37

def apply_negated_command
  @apply_negated_command
end

#countObject (readonly)

Returns the value of attribute count.



32
33
34
# File 'lib/summon/schema/facet.rb', line 32

def count
  @count
end

#further_limiting?Object (readonly)

Returns the value of attribute further_limiting?.



35
36
37
# File 'lib/summon/schema/facet.rb', line 35

def further_limiting?
  @further_limiting?
end

#negated?Object (readonly)

Returns the value of attribute negated?.



33
34
35
# File 'lib/summon/schema/facet.rb', line 33

def negated?
  @negated?
end

#remove_commandObject (readonly)

Returns the value of attribute remove_command.



38
39
40
# File 'lib/summon/schema/facet.rb', line 38

def remove_command
  @remove_command
end

#valueObject (readonly)

Returns the value of attribute value.



31
32
33
# File 'lib/summon/schema/facet.rb', line 31

def value
  @value
end

Instance Method Details

#abs_valueObject



52
53
54
# File 'lib/summon/schema/facet.rb', line 52

def abs_value
  value.sub /^-/, ''
end

#escaped_valueObject



40
41
42
# File 'lib/summon/schema/facet.rb', line 40

def escaped_value
  Summon.escape(@value)
end

#excluded?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/summon/schema/facet.rb', line 44

def excluded?
  negated?
end

#included?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/summon/schema/facet.rb', line 48

def included?
  applied? && !excluded?
end