Class: RubyLsp::Ree::ParsedDaoDocument::DaoField

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, location:, type:, default:) ⇒ DaoField

Returns a new instance of DaoField.



9
10
11
12
13
14
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 9

def initialize(name:, location:, type:, default:)
  @name = name
  @location = location
  @type = type
  @default = default
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



7
8
9
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 7

def default
  @default
end

#locationObject (readonly)

Returns the value of attribute location.



7
8
9
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 7

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 7

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 7

def type
  @type
end

Instance Method Details

#has_default?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 16

def has_default?
  !!@default
end