Class: ActiveRecord::LookML::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/lookml/field.rb

Instance Method Summary collapse

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