Class: TrangeFrange::Base

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



4
5
6
# File 'lib/trange_frange/base.rb', line 4

def base
  @base
end

Instance Method Details

#gender?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/trange_frange/base.rb', line 10

def gender?
  %w[1 2].include? member.one
end

#memberObject



14
15
16
# File 'lib/trange_frange/base.rb', line 14

def member
  @member ||= TrangeFrange::Member.new base
end

#teen?Boolean

range [10-19]

Returns:

  • (Boolean)


6
7
8
# File 'lib/trange_frange/base.rb', line 6

def teen?
  member.ten == '1'
end