Module: Chicago::Schema::NamedElement
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns a human-friendly name for this dimension or fact.
-
#name ⇒ Object
readonly
Returns the name of this dimension or fact.
Instance Method Summary collapse
Instance Attribute Details
#label ⇒ Object (readonly)
Returns a human-friendly name for this dimension or fact.
8 9 10 |
# File 'lib/chicago/schema/named_element.rb', line 8 def label @label end |
#name ⇒ Object (readonly)
Returns the name of this dimension or fact.
5 6 7 |
# File 'lib/chicago/schema/named_element.rb', line 5 def name @name end |
Instance Method Details
#initialize(name, opts = {}) ⇒ Object
10 11 12 13 |
# File 'lib/chicago/schema/named_element.rb', line 10 def initialize(name, opts={}) @name = name.to_sym @label = opts[:label] || name.to_s.titlecase end |