Class: Flip::Definition

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, options = {}) ⇒ Definition

Returns a new instance of Definition.



7
8
9
10
# File 'lib/flip/definition.rb', line 7

def initialize(key, options = {})
  @key = key
  @options = {description: "#{key.to_s.humanize}."}.merge(options)
end

Instance Attribute Details

#keyObject Also known as: name, to_s

Returns the value of attribute key.



4
5
6
# File 'lib/flip/definition.rb', line 4

def key
  @key
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/flip/definition.rb', line 5

def options
  @options
end

Instance Method Details

#descriptionObject



15
16
17
# File 'lib/flip/definition.rb', line 15

def description
  options[:description]
end