Class: Groupy::Value

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Value

Returns a new instance of Value.



122
123
124
125
# File 'lib/groupy.rb', line 122

def initialize(name)
  @name  = name.to_s.gsub("::", "").underscore.to_sym
  @value = name.to_s.freeze
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



126
127
128
# File 'lib/groupy.rb', line 126

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



126
127
128
# File 'lib/groupy.rb', line 126

def value
  @value
end

Instance Method Details

#valuesObject



128
129
130
# File 'lib/groupy.rb', line 128

def values
  [value]
end