Class: Flip::Definition
- Inherits:
-
Object
- Object
- Flip::Definition
- Defined in:
- lib/flip/definition.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
(also: #name, #to_s)
Returns the value of attribute key.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(key, options = {}) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(key, options = {}) ⇒ Definition
Returns a new instance of Definition.
7 8 9 10 11 |
# File 'lib/flip/definition.rb', line 7 def initialize(key, = {}) @key = key @options = .reverse_merge \ description: key.to_s.humanize + "." end |
Instance Attribute Details
#key ⇒ Object 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 |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/flip/definition.rb', line 5 def @options end |
Instance Method Details
#description ⇒ Object
16 17 18 |
# File 'lib/flip/definition.rb', line 16 def description [:description] end |