Class: ActiveRecord::LookML::Field
- Inherits:
-
Object
- Object
- ActiveRecord::LookML::Field
- Defined in:
- lib/active_record/lookml/field.rb
Instance Method Summary collapse
-
#initialize(name:, value:) ⇒ Field
constructor
A new instance of Field.
- #to_lookml(indent_level: 0) ⇒ Object
Constructor Details
#initialize(name:, value:) ⇒ Field
Returns a new instance of Field.
4 5 6 7 |
# File 'lib/active_record/lookml/field.rb', line 4 def initialize(name:, value:) @name = name @value = value end |
Instance Method Details
#to_lookml(indent_level: 0) ⇒ Object
9 10 11 12 |
# File 'lib/active_record/lookml/field.rb', line 9 def to_lookml(indent_level: 0) indent = ' ' * indent_level "#{indent}#{@name}: #{@value}\n" end |