Class: WeatherLink::RecordType

Inherits:
Struct
  • Object
show all
Defined in:
lib/weatherlink.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



52
53
54
# File 'lib/weatherlink.rb', line 52

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



52
53
54
# File 'lib/weatherlink.rb', line 52

def name
  @name
end

#systemObject

Returns the value of attribute system

Returns:

  • (Object)

    the current value of system



52
53
54
# File 'lib/weatherlink.rb', line 52

def system
  @system
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



52
53
54
# File 'lib/weatherlink.rb', line 52

def type
  @type
end

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/weatherlink.rb', line 61

def archive?
  type == :archive
end

#current_conditions?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/weatherlink.rb', line 57

def current_conditions?
  type == :current_conditions
end

#descriptionObject



53
54
55
# File 'lib/weatherlink.rb', line 53

def description
  "#{system.name} - #{name}"
end

#health?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/weatherlink.rb', line 65

def health?
  type == :health
end