Class: MyJohnDeereApi::Model::Field

Inherits:
Base
  • Object
show all
Defined in:
lib/my_john_deere_api/model/field.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #id, #links, #record_type

Instance Method Summary collapse

Methods inherited from Base

#accessor, #initialize

Constructor Details

This class inherits a constructor from MyJohnDeereApi::Model::Base

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#archived?Boolean

Since the archived attribute is boolean, we reflect this in the method name instead of using a standard attr_reader.

Returns:

  • (Boolean)


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

def archived?
  @archived
end

#flagsObject

flags associated with this organization



16
17
18
19
# File 'lib/my_john_deere_api/model/field.rb', line 16

def flags
  return @flags if defined?(@flags)
  @flags = Request::Collection::Flags.new(client, organization: organization_id, field: id)
end