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?.



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

def applied?
  @applied?
end

#apply_commandObject (readonly)

Returns the value of attribute apply_command.



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

def apply_command
  @apply_command
end

#apply_negated_commandObject (readonly)

Returns the value of attribute apply_negated_command.



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

def apply_negated_command
  @apply_negated_command
end

#countObject (readonly)

Returns the value of attribute count.



29
30
31
# File 'lib/summon/schema/facet.rb', line 29

def count
  @count
end

#further_limiting?Object (readonly)

Returns the value of attribute further_limiting?.



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

def further_limiting?
  @further_limiting?
end

#negated?Object (readonly)

Returns the value of attribute negated?.



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

def negated?
  @negated?
end

#remove_commandObject (readonly)

Returns the value of attribute remove_command.



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

def remove_command
  @remove_command
end

#valueObject (readonly)

Returns the value of attribute value.



28
29
30
# File 'lib/summon/schema/facet.rb', line 28

def value
  @value
end

Instance Method Details

#abs_valueObject



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

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

#escaped_valueObject



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

def escaped_value
  Summon.escape(@value)
end

#excluded?Boolean



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

def excluded?
  negated?
end

#included?Boolean



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

def included?
  applied? && !excluded?
end