Class: PSGC::Barangay

Inherits:
Struct
  • Object
show all
Defined in:
lib/psgc/barangay.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



2
3
4
# File 'lib/psgc/barangay.rb', line 2

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/psgc/barangay.rb', line 2

def name
  @name
end

#populationObject

Returns the value of attribute population

Returns:

  • (Object)

    the current value of population



2
3
4
# File 'lib/psgc/barangay.rb', line 2

def population
  @population
end

#urbanObject

Returns the value of attribute urban

Returns:

  • (Object)

    the current value of urban



2
3
4
# File 'lib/psgc/barangay.rb', line 2

def urban
  @urban
end

Instance Method Details

#is_rural?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/psgc/barangay.rb', line 6

def is_rural?
  !urban
end

#is_urban?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/psgc/barangay.rb', line 3

def is_urban?
  urban
end