Class: CloudQuery::Field

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ Field

Returns a new instance of Field.



5
6
7
# File 'lib/cloud_query/field.rb', line 5

def initialize(name, type)
  @name, @type = name, type
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/cloud_query/field.rb', line 3

def name
  @name
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/cloud_query/field.rb', line 3

def type
  @type
end

#usageObject

Returns the value of attribute usage.



3
4
5
# File 'lib/cloud_query/field.rb', line 3

def usage
  @usage
end

Instance Method Details

#to_node(builder) ⇒ Object



9
10
11
# File 'lib/cloud_query/field.rb', line 9

def to_node(builder)
  builder.field attributes
end